about summary refs log tree commit diff
path: root/src/libfmt_macros
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-11-24 12:11:20 +1300
committerNick Cameron <ncameron@mozilla.com>2015-11-24 15:11:41 +1300
commit5fb6531903c4e425f48a859463bee20cfcc7f7c5 (patch)
treee8e48cc9f8f2cfe14906aeefc7afc4537b088ad1 /src/libfmt_macros
parent0dfd875b6efa68ed67988a2f9856fc3bbdc91ce2 (diff)
downloadrust-5fb6531903c4e425f48a859463bee20cfcc7f7c5.tar.gz
rust-5fb6531903c4e425f48a859463bee20cfcc7f7c5.zip
rustfmt: libflate, libfmt_macros, libgetopts, libgraphviz, liblog, librand
Diffstat (limited to 'src/libfmt_macros')
-rw-r--r--src/libfmt_macros/lib.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs
index dc69f38e4e7..2cd046dc38a 100644
--- a/src/libfmt_macros/lib.rs
+++ b/src/libfmt_macros/lib.rs
@@ -187,7 +187,7 @@ impl<'a> Parser<'a> {
         Parser {
             input: s,
             cur: s.char_indices().peekable(),
-            errors: vec!(),
+            errors: vec![],
         }
     }
 
@@ -236,7 +236,7 @@ impl<'a> Parser<'a> {
             if c.is_whitespace() {
                 self.cur.next();
             } else {
-                break
+                break;
             }
         }
     }
@@ -274,9 +274,7 @@ impl<'a> Parser<'a> {
             ArgumentIs(i)
         } else {
             match self.cur.peek() {
-                Some(&(_, c)) if c.is_alphabetic() => {
-                    ArgumentNamed(self.word())
-                }
+                Some(&(_, c)) if c.is_alphabetic() => ArgumentNamed(self.word()),
                 _ => ArgumentNext,
             }
         }
@@ -294,7 +292,7 @@ impl<'a> Parser<'a> {
             ty: &self.input[..0],
         };
         if !self.consume(':') {
-            return spec
+            return spec;
         }
 
         // fill character
@@ -419,7 +417,7 @@ impl<'a> Parser<'a> {
                 found = true;
                 self.cur.next();
             } else {
-                break
+                break;
             }
         }
         if found {
@@ -447,7 +445,7 @@ mod tests {
             precision: CountImplied,
             width: CountImplied,
             ty: "",
-        }
+        };
     }
 
     fn musterr(s: &str) {