Skip to content

Commit 36a597c

Browse files
committed
Rollup merge of rust-lang#29032 - goyox86:goyox86/rusfmting-librustc_bitflags, r=alexcrichton
Hi Rustaceans! This is the result of running latest rustfmt on librustc_bitflags! //cc @nrc
2 parents cdd8ed2 + 19a2a76 commit 36a597c

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/librustc_bitflags/lib.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222

2323
//! A typesafe bitmask flag generator.
2424
25-
#[cfg(test)] #[macro_use] extern crate std;
25+
#[cfg(test)]
26+
#[macro_use]
27+
extern crate std;
2628

2729
/// The `bitflags!` macro generates a `struct` that holds a set of C-style
2830
/// bitmask flags. It is useful for creating typesafe wrappers for C APIs.
@@ -321,7 +323,7 @@ mod tests {
321323
}
322324

323325
#[test]
324-
fn test_bits(){
326+
fn test_bits() {
325327
assert_eq!(Flags::empty().bits(), 0b00000000);
326328
assert_eq!(Flags::FlagA.bits(), 0b00000001);
327329
assert_eq!(Flags::FlagABC.bits(), 0b00000111);
@@ -354,7 +356,7 @@ mod tests {
354356
}
355357

356358
#[test]
357-
fn test_is_empty(){
359+
fn test_is_empty() {
358360
assert!(Flags::empty().is_empty());
359361
assert!(!Flags::FlagA.is_empty());
360362
assert!(!Flags::FlagABC.is_empty());
@@ -413,7 +415,7 @@ mod tests {
413415
}
414416

415417
#[test]
416-
fn test_insert(){
418+
fn test_insert() {
417419
let mut e1 = Flags::FlagA;
418420
let e2 = Flags::FlagA | Flags::FlagB;
419421
e1.insert(e2);
@@ -425,7 +427,7 @@ mod tests {
425427
}
426428

427429
#[test]
428-
fn test_remove(){
430+
fn test_remove() {
429431
let mut e1 = Flags::FlagA | Flags::FlagB;
430432
let e2 = Flags::FlagA | Flags::FlagC;
431433
e1.remove(e2);
@@ -484,12 +486,12 @@ mod tests {
484486

485487
#[test]
486488
fn test_hash() {
487-
let mut x = Flags::empty();
488-
let mut y = Flags::empty();
489-
assert!(hash(&x) == hash(&y));
490-
x = Flags::all();
491-
y = Flags::FlagABC;
492-
assert!(hash(&x) == hash(&y));
489+
let mut x = Flags::empty();
490+
let mut y = Flags::empty();
491+
assert!(hash(&x) == hash(&y));
492+
x = Flags::all();
493+
y = Flags::FlagABC;
494+
assert!(hash(&x) == hash(&y));
493495
}
494496

495497
fn hash<T: Hash>(t: &T) -> u64 {

0 commit comments

Comments
 (0)