about summary refs log tree commit diff
path: root/src/libsyntax/util
diff options
context:
space:
mode:
authoriirelu <anna@bawk.space>2016-10-29 22:54:04 +0100
committeriirelu <anna@bawk.space>2016-10-31 22:51:40 +0000
commite593c3b89343a98bdcc76ce9f5869ff18882dfff (patch)
tree86cc097322145fde8ec27dca59fa70787e5cddc3 /src/libsyntax/util
parentf26eedb571c8e3f55385f3933be256689deed277 (diff)
downloadrust-e593c3b89343a98bdcc76ce9f5869ff18882dfff.tar.gz
rust-e593c3b89343a98bdcc76ce9f5869ff18882dfff.zip
Changed most vec! invocations to use square braces
Most of the Rust community agrees that the vec! macro is clearer when
called using square brackets [] instead of regular brackets (). Most of
these ocurrences are from before macros allowed using different types of
brackets.

There is one left unchanged in a pretty-print test, as the pretty
printer still wants it to have regular brackets.
Diffstat (limited to 'src/libsyntax/util')
-rw-r--r--src/libsyntax/util/small_vector.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs
index 57258c76335..9be7dbd6817 100644
--- a/src/libsyntax/util/small_vector.rs
+++ b/src/libsyntax/util/small_vector.rs
@@ -105,7 +105,7 @@ impl<T> SmallVector<T> {
             One(..) => {
                 let one = mem::replace(&mut self.repr, Zero);
                 match one {
-                    One(v1) => mem::replace(&mut self.repr, Many(vec!(v1, v))),
+                    One(v1) => mem::replace(&mut self.repr, Many(vec![v1, v])),
                     _ => unreachable!()
                 };
             }
@@ -314,12 +314,12 @@ mod tests {
     #[test]
     #[should_panic]
     fn test_expect_one_many() {
-        SmallVector::many(vec!(1, 2)).expect_one("");
+        SmallVector::many(vec![1, 2]).expect_one("");
     }
 
     #[test]
     fn test_expect_one_one() {
         assert_eq!(1, SmallVector::one(1).expect_one(""));
-        assert_eq!(1, SmallVector::many(vec!(1)).expect_one(""));
+        assert_eq!(1, SmallVector::many(vec![1]).expect_one(""));
     }
 }