Skip to content

Commit

Permalink
Merge 6732d8b into 06dfc42
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed May 31, 2020
2 parents 06dfc42 + 6732d8b commit 1378cf0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yaserde_derive/src/common/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ impl From<&syn::Path> for Field {

impl From<&syn::Field> for Field {
fn from(field: &syn::Field) -> Self {
match field.ty {
let mut ty = &field.ty;
while let syn::Type::Group(g) = ty {
ty = &g.elem;
}
match ty {
Path(ref path) => Field::from(&path.path),
_ => panic!("unable to match {:?}", field.ty),
}
Expand Down

0 comments on commit 1378cf0

Please sign in to comment.