refactor: fix fmt and clippy
This commit is contained in:
parent
f997a85567
commit
04396aafb2
@ -4,10 +4,8 @@ extern crate yaserde;
|
||||
extern crate yaserde_derive;
|
||||
|
||||
use log::debug;
|
||||
use std::default;
|
||||
use std::io::Read;
|
||||
use std::str::FromStr;
|
||||
use yaserde::de::{self, from_str};
|
||||
use yaserde::de::from_str;
|
||||
use yaserde::YaDeserialize;
|
||||
|
||||
fn init() {
|
||||
|
||||
@ -293,7 +293,7 @@ impl From<&Field> for String {
|
||||
Field::FieldU64 => "u64".to_string(),
|
||||
Field::FieldF32 => "f32".to_string(),
|
||||
Field::FieldF64 => "f64".to_string(),
|
||||
Field::FieldStruct { struct_name } => quote!{#struct_name}.to_string(),
|
||||
Field::FieldStruct { struct_name } => quote! {#struct_name}.to_string(),
|
||||
_ => panic!("Not a simple type: {:?}", field),
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ pub fn parse(
|
||||
Field::FieldStruct { struct_name } => visit_vec(
|
||||
"e! { .push(value) },
|
||||
&Ident::new("visit_str", field.get_span()),
|
||||
&build_visitor_ident(&label_name, field.get_span(), Some(&struct_name)),
|
||||
&build_visitor_ident(&label_name, field.get_span(), Some(struct_name)),
|
||||
),
|
||||
Field::FieldOption { .. } | Field::FieldVec { .. } => unimplemented!("Not supported"),
|
||||
simple_type => visit_vec(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user