about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2017-10-07 05:31:21 -0400
committerTamir Duberstein <tamird@gmail.com>2017-10-07 05:48:21 -0400
commit19dcf9190ce3c28188781806135b9f9e24e771c9 (patch)
tree3f57ea195624270e9b2fa529d40339aa20f5b22b
parent45907f5caca8ea3023174b939d1fd4c052569420 (diff)
downloadrust-19dcf9190ce3c28188781806135b9f9e24e771c9.tar.gz
rust-19dcf9190ce3c28188781806135b9f9e24e771c9.zip
fmt: DRY
-rw-r--r--src/libcore/fmt/builders.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/fmt/builders.rs b/src/libcore/fmt/builders.rs
index b594c886b64..60b9eeb1283 100644
--- a/src/libcore/fmt/builders.rs
+++ b/src/libcore/fmt/builders.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use fmt::{self, FlagV1};
+use fmt;
 
 struct PadAdapter<'a, 'b: 'a> {
     fmt: &'a mut fmt::Formatter<'b>,
@@ -140,7 +140,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
     }
 
     fn is_pretty(&self) -> bool {
-        self.fmt.flags() & (1 << (FlagV1::Alternate as usize)) != 0
+        self.fmt.alternate()
     }
 }
 
@@ -233,7 +233,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> {
     }
 
     fn is_pretty(&self) -> bool {
-        self.fmt.flags() & (1 << (FlagV1::Alternate as usize)) != 0
+        self.fmt.alternate()
     }
 }
 
@@ -277,7 +277,7 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> {
     }
 
     fn is_pretty(&self) -> bool {
-        self.fmt.flags() & (1 << (FlagV1::Alternate as usize)) != 0
+        self.fmt.alternate()
     }
 }
 
@@ -519,6 +519,6 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
     }
 
     fn is_pretty(&self) -> bool {
-        self.fmt.flags() & (1 << (FlagV1::Alternate as usize)) != 0
+        self.fmt.alternate()
     }
 }