fn remove_supported_attributes(attrs: &mut Vec<Attribute>) -> HashMap<&'static str, Attribute> {
	let mut result = HashMap::new();
	attrs.retain(|v| {
		match SUPPORTED_ATTRIBUTE_NAMES.iter().find(|a| v.path.is_ident(a)) {
			Some(attribute) => {
				result.insert(*attribute, v.clone());
				false
			},
			None => true,
		}
	});

	result
}
/// Remove all attributes from the vector that are supported by us in the declaration of a runtime
/// api trait. The returned hashmap contains all found attribute names as keys and the rest of the
/// attribute body as `TokenStream`.
Remove all attributes from the vector that are supported by us in the declaration of a runtime
api trait. The returned hashmap contains all found attribute names as keys and the rest of the
attribute body as `TokenStream`.
Remove all attributes from the vector that are supported by us in the declaration of a runtime api trait . The returned hashmap contains all found attribute names as keys and the rest of the attribute body as ` TokenStream ` .
fn remove_supported_attributes(attrs: &mut Vec<Attribute>) -> HashMap<&'static str, Attribute> {
	let mut result = HashMap::new();
	attrs.retain(|v| {
		match SUPPORTED_ATTRIBUTE_NAMES.iter().find(|a| v.path.is_ident(a)) {
			Some(attribute) => {
				result.insert(*attribute, v.clone());
				false
			},
			None => true,
		}
	});
	result
}
fn remove_supported_attributes ( attrs : & mut Vec < Attribute > ) -> HashMap < & ' static str , Attribute > { let mut result = HashMap :: new ( ) ; attrs . retain ( | v | { match SUPPORTED_ATTRIBUTE_NAMES . iter ( ) . find ( | a | v . path . is_ident ( a ) ) { Some ( attribute ) => { result . insert ( * attribute , v . clone ( ) ) ; false } , None => true , } } ) ; result }
Remove all attributes from the vector that are supported by us in the declaration of a runtime
api trait.
Remove all attributes from the vector that are supported by us in the declaration of a runtime api trait .
attrs
&mut Vec<Attribute>
attrs
&mut Vec<Attribute>