Only process "crate" from schemars attr, not serde attr

This commit is contained in:
Graham Esau 2021-04-10 14:48:39 +01:00
parent 6d174a2efb
commit 2d38db903a

View file

@ -128,7 +128,7 @@ impl Attrs {
}
}
Meta(NameValue(m)) if m.path.is_ident("crate") => {
Meta(NameValue(m)) if m.path.is_ident("crate") && attr_type == "schemars" => {
if let Ok(p) = parse_lit_into_path(errors, attr_type, "crate", &m.lit) {
if self.crate_name.is_some() {
duplicate_error(m)