Drop unnecessary qualification of String outside of generated code
This commit is contained in:
@@ -273,7 +273,7 @@ impl Into<proc_macro2::TokenStream> for Field {
|
||||
}
|
||||
|
||||
impl Into<String> for &Field {
|
||||
fn into(self) -> std::string::String {
|
||||
fn into(self) -> String {
|
||||
match self {
|
||||
Field::FieldString => "str".to_string(),
|
||||
Field::FieldBool => "bool".to_string(),
|
||||
@@ -294,7 +294,7 @@ impl Into<String> for &Field {
|
||||
|
||||
impl fmt::Display for Field {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let string_representation: std::string::String = self.into();
|
||||
let string_representation: String = self.into();
|
||||
write!(f, "{}", string_representation)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ fn build_unnamed_field_visitors(fields: &syn::FieldsUnnamed) -> TokenStream {
|
||||
|
||||
match field.get_type() {
|
||||
Field::FieldStruct { struct_name } => {
|
||||
let struct_id: std::string::String = struct_name
|
||||
let struct_id: String = struct_name
|
||||
.segments
|
||||
.iter()
|
||||
.map(|s| s.ident.to_string())
|
||||
|
||||
@@ -66,7 +66,7 @@ pub fn parse(
|
||||
.map(|field| YaSerdeField::new(field.clone()))
|
||||
.map(|field| {
|
||||
let struct_visitor = |struct_name: syn::Path| {
|
||||
let struct_id: std::string::String = struct_name
|
||||
let struct_id: String = struct_name
|
||||
.segments
|
||||
.iter()
|
||||
.map(|s| s.ident.to_string())
|
||||
|
||||
Reference in New Issue
Block a user