Skip to content

Commit

Permalink
Ran cargo fmt --all
Browse files Browse the repository at this point in the history
  • Loading branch information
regexident committed Aug 3, 2018
1 parent 7c20817 commit 87444fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/bindgen/ir/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ impl Function {
r.apply_to_snake_case(&x.0, IdentifierType::FunctionArg),
x.1.clone(),
)
}).collect()
})
.collect()
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions src/bindgen/ir/structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ impl Struct {
let (fields, tuple_struct) = match &item.fields {
&syn::Fields::Unit => (Vec::new(), false),
&syn::Fields::Named(ref fields) => {
let out = fields.named.iter().try_skip_map(|x| x.as_ident_and_type())?;
let out = fields
.named
.iter()
.try_skip_map(|x| x.as_ident_and_type())?;
(out, false)
}
&syn::Fields::Unnamed(ref fields) => {
Expand Down Expand Up @@ -318,8 +321,7 @@ impl Source for Struct {
.map(|&(ref name, ref ty, _)| {
// const-ref args to constructor
(format!("const& {}", arg_renamer(name)), ty.clone())
})
.collect(),
}).collect(),
ListType::Join(","),
);
write!(out, ")");
Expand Down
3 changes: 2 additions & 1 deletion src/bindgen/ir/union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ impl Item for Union {
x.1.clone(),
x.2.clone(),
)
}).collect();
})
.collect();
} else if self.tuple_union {
// If we don't have any rules for a tuple union, prefix them with
// an underscore so it still compiles
Expand Down

0 comments on commit 87444fc

Please sign in to comment.