about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-10-14 09:53:41 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-10-14 12:50:57 +0530
commit36a597c7b020364f185980f0645189ad7e8e3d79 (patch)
treee157fef757ccf62823aa1554f4e344e401e03ffa
parentcdd8ed26c4ec49b983bf4db29f4d92923d70c684 (diff)
parent19a2a769a5d74d1c0fabc71a3829c4042824fb05 (diff)
downloadrust-36a597c7b020364f185980f0645189ad7e8e3d79.tar.gz
rust-36a597c7b020364f185980f0645189ad7e8e3d79.zip
Rollup merge of #29032 - goyox86:goyox86/rusfmting-librustc_bitflags, r=alexcrichton
Hi Rustaceans!

This is the result of running latest rustfmt on librustc_bitflags!

//cc @nrc
-rw-r--r--src/librustc_bitflags/lib.rs24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs
index 3ee45c3506e..16f586cf5e0 100644
--- a/src/librustc_bitflags/lib.rs
+++ b/src/librustc_bitflags/lib.rs
@@ -22,7 +22,9 @@
 
 //! A typesafe bitmask flag generator.
 
-#[cfg(test)] #[macro_use] extern crate std;
+#[cfg(test)]
+#[macro_use]
+extern crate std;
 
 /// The `bitflags!` macro generates a `struct` that holds a set of C-style
 /// bitmask flags. It is useful for creating typesafe wrappers for C APIs.
@@ -321,7 +323,7 @@ mod tests {
     }
 
     #[test]
-    fn test_bits(){
+    fn test_bits() {
         assert_eq!(Flags::empty().bits(), 0b00000000);
         assert_eq!(Flags::FlagA.bits(), 0b00000001);
         assert_eq!(Flags::FlagABC.bits(), 0b00000111);
@@ -354,7 +356,7 @@ mod tests {
     }
 
     #[test]
-    fn test_is_empty(){
+    fn test_is_empty() {
         assert!(Flags::empty().is_empty());
         assert!(!Flags::FlagA.is_empty());
         assert!(!Flags::FlagABC.is_empty());
@@ -413,7 +415,7 @@ mod tests {
     }
 
     #[test]
-    fn test_insert(){
+    fn test_insert() {
         let mut e1 = Flags::FlagA;
         let e2 = Flags::FlagA | Flags::FlagB;
         e1.insert(e2);
@@ -425,7 +427,7 @@ mod tests {
     }
 
     #[test]
-    fn test_remove(){
+    fn test_remove() {
         let mut e1 = Flags::FlagA | Flags::FlagB;
         let e2 = Flags::FlagA | Flags::FlagC;
         e1.remove(e2);
@@ -484,12 +486,12 @@ mod tests {
 
     #[test]
     fn test_hash() {
-      let mut x = Flags::empty();
-      let mut y = Flags::empty();
-      assert!(hash(&x) == hash(&y));
-      x = Flags::all();
-      y = Flags::FlagABC;
-      assert!(hash(&x) == hash(&y));
+        let mut x = Flags::empty();
+        let mut y = Flags::empty();
+        assert!(hash(&x) == hash(&y));
+        x = Flags::all();
+        y = Flags::FlagABC;
+        assert!(hash(&x) == hash(&y));
     }
 
     fn hash<T: Hash>(t: &T) -> u64 {