fn extract_clippy_version_value(cx: &LateContext<'_>, item: &'_ Item<'_>) -> Option<Symbol> {
    let attrs = cx.tcx.hir().attrs(item.hir_id());
    attrs.iter().find_map(|attr| {
        if_chain! {
            // Identify attribute
            if let ast::AttrKind::Normal(ref attr_kind, _) = &attr.kind;
            if let [tool_name, attr_name] = &attr_kind.path.segments[..];
            if tool_name.ident.name == sym::clippy;
            if attr_name.ident.name == sym::version;
            if let Some(version) = attr.value_str();
            then {
                Some(version)
            } else {
                None
            }
        }
    })
}
/// This function extracts the version value of a `clippy::version` attribute if the given value has
/// one
This function extracts the version value of a `clippy::version` attribute if the given value has
one
This function extracts the version value of a ` clippy :: version ` attribute if the given value has one
fn extract_clippy_version_value(cx: &LateContext<'_>, item: &'_ Item<'_>) -> Option<Symbol> {
    let attrs = cx.tcx.hir().attrs(item.hir_id());
    attrs.iter().find_map(|attr| {
        if_chain! {
            // Identify attribute
            if let ast::AttrKind::Normal(ref attr_kind, _) = &attr.kind;
            if let [tool_name, attr_name] = &attr_kind.path.segments[..];
            if tool_name.ident.name == sym::clippy;
            if attr_name.ident.name == sym::version;
            if let Some(version) = attr.value_str();
            then {
                Some(version)
            } else {
                None
            }
        }
    })
}
fn extract_clippy_version_value ( cx : & LateContext < ' _ > , item : & ' _ Item < ' _ > ) -> Option < Symbol > { let attrs = cx . tcx . hir ( ) . attrs ( item . hir_id ( ) ) ; attrs . iter ( ) . find_map ( | attr | { if_chain ! { // Identify attribute if let ast AttrKind Normal ( ref attr_kind ) attr kind if let [ tool_name attr_name ] attr_kind path segments [ ] if tool_name ident name sym clippy if attr_name ident name sym version if let Some ( version ) attr value_str ( ) then { Some ( version ) } else { None } } } ) }
This function extracts the version value of a `clippy::version` attribute if the given value has
one
This function extracts the version value of a ` clippy :: version ` attribute if the given value has one
cx
&LateContext<'_>
item
&'_ Item<'_>