fn extract_impl_trait<'a>(impl_: &'a ItemImpl) -> Result<&'a Path> {
	impl_.trait_.as_ref().map(|v| &v.1).ok_or_else(
		|| Error::new(impl_.span(), "Only implementation of traits are supported!")
	).and_then(|p| {
		if p.segments.len() > 1 {
			Ok(p)
		} else {
			Err(
				Error::new(
					p.span(),
					"The implemented trait has to be referenced with a path, \
					e.g. `impl client::Core for Runtime`."
				)
			)
		}
	})
}
/// Extract the trait that is implemented in the given `ItemImpl`.
Extract the trait that is implemented in the given `ItemImpl`.
Extract the trait that is implemented in the given ` ItemImpl ` .
fn extract_impl_trait<'a>(impl_: &'a ItemImpl) -> Result<&'a Path> {
	impl_.trait_.as_ref().map(|v| &v.1).ok_or_else(
		|| Error::new(impl_.span(), "Only implementation of traits are supported!")
	).and_then(|p| {
		if p.segments.len() > 1 {
			Ok(p)
		} else {
			Err(
				Error::new(
					p.span(),
					"The implemented trait has to be referenced with a path, \
					e.g. `impl client::Core for Runtime`."
				)
			)
		}
	})
}
fn extract_impl_trait < ' a > ( impl_ : & ' a ItemImpl ) -> Result < & ' a Path > { impl_ . trait_ . as_ref ( ) . map ( | v | & v . 1 ) . ok_or_else ( | | Error :: new ( impl_ . span ( ) , " " ) ) . and_then ( | p | { if p . segments . len ( ) > 1 { Ok ( p ) } else { Err ( Error :: new ( p . span ( ) , " \
 " ) ) } } ) }
Extract the trait that is implemented in the given `ItemImpl`.
Extract the trait that is implemented in the given ` ItemImpl ` .
impl_
&'a ItemImpl
impl_
&'a ItemImpl