Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ codecov = { repository = "mgeisler/version-sync" }
[dependencies]
pulldown-cmark = { version = "0.4", default-features = false }
semver-parser = "0.9"
syn = { version = "0.15", features = ["full"] }
proc-macro2 = { version = "0.4", features = ["span-locations"] }
syn = { version = "1.0", features = ["full"] }
proc-macro2 = { version = "1.0", features = ["span-locations"] }
toml = "0.5"
url = "1.0"
itertools = "0.8"
Expand Down
12 changes: 6 additions & 6 deletions src/html_root_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res
if let syn::AttrStyle::Outer = attr.style {
continue;
}
let (ident, nested_meta_items) = match attr.parse_meta() {
Ok(syn::Meta::List(syn::MetaList { ident, nested, .. })) => (ident, nested),
let (attr_path, nested_meta_items) = match attr.parse_meta() {
Ok(syn::Meta::List(syn::MetaList { path, nested, .. })) => (path, nested),
_ => continue,
};

if ident != "doc" {
if !attr_path.is_ident("doc") {
continue;
}

Expand All @@ -97,8 +97,8 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res

let check_result = match *meta_item {
syn::Meta::NameValue(syn::MetaNameValue {
ref ident, ref lit, ..
}) if ident == "html_root_url" => {
ref path, ref lit, ..
}) if path.is_ident("html_root_url") => {
match *lit {
// Accept both cooked and raw strings here.
syn::Lit::Str(ref s) => url_matches(&s.value(), pkg_name, &version),
Expand All @@ -108,7 +108,7 @@ pub fn check_html_root_url(path: &str, pkg_name: &str, pkg_version: &str) -> Res
_ => continue,
}
}
syn::Meta::Word(ref name) if name == "html_root_url" => {
syn::Meta::Path(ref path) if path.is_ident("html_root_url") => {
Err(String::from("html_root_url attribute without URL"))
}
_ => continue,
Expand Down