Clean up clippy lints in codegen_internals
This commit is contained in:
parent
09c69da909
commit
e4f7d8513c
@ -149,7 +149,7 @@ impl Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Literal(_) => {
|
Literal(_) => {
|
||||||
cx.error(format!("unexpected literal in serde container attribute"));
|
cx.error("unexpected literal in serde container attribute");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ impl Variant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Literal(_) => {
|
Literal(_) => {
|
||||||
cx.error(format!("unexpected literal in serde variant attribute"));
|
cx.error("unexpected literal in serde variant attribute");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ impl Field {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Literal(_) => {
|
Literal(_) => {
|
||||||
cx.error(format!("unexpected literal in serde field attribute"));
|
cx.error("unexpected literal in serde field attribute");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -404,7 +404,7 @@ impl Field {
|
|||||||
|
|
||||||
Field {
|
Field {
|
||||||
name: Name {
|
name: Name {
|
||||||
serialize: ser_name.get().unwrap_or(ident.clone()),
|
serialize: ser_name.get().unwrap_or_else(|| ident.clone()),
|
||||||
deserialize: de_name.get().unwrap_or(ident),
|
deserialize: de_name.get().unwrap_or(ident),
|
||||||
},
|
},
|
||||||
skip_serializing: skip_serializing.get(),
|
skip_serializing: skip_serializing.get(),
|
||||||
|
@ -12,7 +12,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
unstable = []
|
unstable = []
|
||||||
unstable-testing = ["clippy"]
|
unstable-testing = ["clippy", "serde_codegen_internals/unstable-testing"]
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
travis-ci = { repository = "serde-rs/serde" }
|
travis-ci = { repository = "serde-rs/serde" }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user