update clippy and fix error messages
This commit is contained in:
@@ -151,7 +151,7 @@ pub fn parse(
|
||||
.map(|variant| {
|
||||
let field_attrs = YaSerdeAttribute::parse(&variant.attrs);
|
||||
let renamed_label = match field_attrs.rename {
|
||||
Some(value) => Ident::new(&format!("{}", value), Span::call_site()),
|
||||
Some(value) => Ident::new(&value.to_string(), Span::call_site()),
|
||||
None => variant.ident.clone(),
|
||||
};
|
||||
let label = &variant.ident;
|
||||
|
||||
@@ -130,7 +130,7 @@ pub fn parse(
|
||||
.map(|field| {
|
||||
let field_attrs = YaSerdeAttribute::parse(&field.attrs);
|
||||
let label_name = if let Some(value) = field_attrs.rename {
|
||||
Ident::new(&format!("{}", value), Span::call_site()).to_string()
|
||||
Ident::new(&value.to_string(), Span::call_site()).to_string()
|
||||
} else {
|
||||
field.ident.clone().unwrap().to_string()
|
||||
};
|
||||
@@ -313,7 +313,7 @@ pub fn parse(
|
||||
}
|
||||
|
||||
let label_name = if let Some(value) = field_attrs.rename {
|
||||
Ident::new(&format!("{}", value), Span::call_site()).to_string()
|
||||
Ident::new(&value.to_string(), Span::call_site()).to_string()
|
||||
} else {
|
||||
field.ident.clone().unwrap().to_string()
|
||||
};
|
||||
@@ -781,7 +781,7 @@ pub fn parse(
|
||||
|
||||
let label = &field.ident;
|
||||
let label_name = if let Some(value) = field_attrs.rename {
|
||||
Ident::new(&format!("{}", value), Span::call_site()).to_string()
|
||||
Ident::new(&value.to_string(), Span::call_site()).to_string()
|
||||
} else {
|
||||
field.ident.clone().unwrap().to_string()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user