@@ -80,12 +80,12 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res
80
80
if let syn:: AttrStyle :: Outer = attr. style {
81
81
continue ;
82
82
}
83
- let ( ident , nested_meta_items) = match attr. parse_meta ( ) {
84
- Ok ( syn:: Meta :: List ( syn:: MetaList { ident , nested, .. } ) ) => ( ident , nested) ,
83
+ let ( attr_path , nested_meta_items) = match attr. parse_meta ( ) {
84
+ Ok ( syn:: Meta :: List ( syn:: MetaList { path , nested, .. } ) ) => ( path , nested) ,
85
85
_ => continue ,
86
86
} ;
87
87
88
- if ident != "doc" {
88
+ if !attr_path . is_ident ( "doc" ) {
89
89
continue ;
90
90
}
91
91
@@ -97,8 +97,8 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res
97
97
98
98
let check_result = match * meta_item {
99
99
syn:: Meta :: NameValue ( syn:: MetaNameValue {
100
- ref ident , ref lit, ..
101
- } ) if ident == "html_root_url" => {
100
+ ref path , ref lit, ..
101
+ } ) if path . is_ident ( "html_root_url" ) => {
102
102
match * lit {
103
103
// Accept both cooked and raw strings here.
104
104
syn:: Lit :: Str ( ref s) => url_matches ( & s. value ( ) , pkg_name, & version) ,
@@ -108,7 +108,7 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res
108
108
_ => continue ,
109
109
}
110
110
}
111
- syn:: Meta :: Word ( ref name ) if name == "html_root_url" => {
111
+ syn:: Meta :: Path ( ref path ) if path . is_ident ( "html_root_url" ) => {
112
112
Err ( String :: from ( "html_root_url attribute without URL" ) )
113
113
}
114
114
_ => continue ,
0 commit comments