Address clippy lints in serde_derive

This commit is contained in:
David Tolnay
2018-01-09 19:34:35 -08:00
parent 34eaab00f7
commit 16bc9fb99e
3 changed files with 88 additions and 94 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ where
}
}
if path.leading_colon.is_none() && path.segments.len() == 1 {
let id = path.segments[0].ident.clone();
let id = path.segments[0].ident;
if self.all_ty_params.contains(&id) {
self.relevant_ty_params.insert(id);
}
@@ -289,7 +289,7 @@ fn type_of_item(cont: &Container) -> syn::Type {
leading_colon: None,
segments: vec![
syn::PathSegment {
ident: cont.ident.clone(),
ident: cont.ident,
arguments: syn::PathArguments::AngleBracketed(
syn::AngleBracketedGenericArguments {
colon2_token: None,