Skip to content

Commit

Permalink
refactor: fix fmt and clippy based on contributions
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAntoine-Arnaud committed Jan 3, 2024
1 parent 6f434c8 commit 0578b73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions yaserde/tests/deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,17 +1087,17 @@ fn de_attribute_sequence() {

#[test]
fn de_nested_macro_rules() {
init!();
init();

macro_rules! float_attrs {
($type:ty) => {
#[derive(Default, PartialEq, Debug, YaDeserialize)]
pub struct Outer{
pub struct Outer {
#[yaserde(attribute)]
pub inner: Option<$type>,
}
};
}

float_attrs!(f32);
}
}
8 changes: 4 additions & 4 deletions yaserde_derive/src/common/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,17 @@ impl From<&syn::PathSegment> for Field {
match args.args.first() {
Some(syn::GenericArgument::Type(Path(ref path))) => {
return Field::from(&path.path);
},
Some(syn::GenericArgument::Type(syn::Type::Group(syn::TypeGroup { elem, ..}))) => {
}
Some(syn::GenericArgument::Type(syn::Type::Group(syn::TypeGroup { elem, .. }))) => {
if let syn::Type::Path(ref group) = elem.as_ref() {
return Field::from(&group.path);
}
},
}
_ => unimplemented!("unable to match '{:?}'", args.args.first()),
}
}

unimplemented!("unable to match '{}'", quote!{#path_segment})
unimplemented!("unable to match '{}'", quote! {#path_segment})
}
}

Expand Down

0 comments on commit 0578b73

Please sign in to comment.