summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-10-14 15:14:19 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-10-14 15:14:19 +0200
commit3e1b714498ef18ff7a9ef4421ab2a3114030fa01 (patch)
treebad804f18ce4ed9e2f04c8a8bf7a52b85d2e50e6
parentf6867510999e2010db1ee80ef3d63c4befc9881e (diff)
Rustfmt to account for rebase.
-rw-r--r--src/codegen/mod.rs6
-rw-r--r--src/ir/item.rs9
-rw-r--r--src/lib.rs2
3 files changed, 9 insertions, 8 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 32dc48a1..c1bac621 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -1213,8 +1213,10 @@ impl Bitfield {
.layout(ctx)
.expect("Bitfield without layout? Gah!");
let bitfield_int_ty = helpers::integer_type(ctx, bitfield_ty_layout)
- .expect("Should already have verified that the bitfield is \
- representable as an int");
+ .expect(
+ "Should already have verified that the bitfield is \
+ representable as an int",
+ );
let offset = self.offset_into_unit();
let width = self.width() as u8;
diff --git a/src/ir/item.rs b/src/ir/item.rs
index 78edcf2c..cf663d33 100644
--- a/src/ir/item.rs
+++ b/src/ir/item.rs
@@ -526,11 +526,10 @@ impl Item {
/// below this item's lexical scope, meaning that this can be useful for
/// generating relatively stable identifiers within a scope.
pub fn local_id(&self, ctx: &BindgenContext) -> usize {
- *self.local_id
- .borrow_with(|| {
- let parent = ctx.resolve_item(self.parent_id);
- parent.next_child_local_id()
- })
+ *self.local_id.borrow_with(|| {
+ let parent = ctx.resolve_item(self.parent_id);
+ parent.next_child_local_id()
+ })
}
/// Get an identifier that differentiates a child of this item of other
diff --git a/src/lib.rs b/src/lib.rs
index 297421e5..beab70c3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -23,8 +23,8 @@ extern crate cexpr;
#[allow(unused_extern_crates)]
extern crate cfg_if;
extern crate clang_sys;
-extern crate rustc_hash;
extern crate lazycell;
+extern crate rustc_hash;
#[macro_use]
extern crate lazy_static;
extern crate peeking_take_while;