about summary refs log tree commit diff
path: root/src/libtest
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/libtest
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/libtest')
-rw-r--r--src/libtest/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 8b0fd1ca0cb..95ae6eb2efe 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -336,7 +336,7 @@ pub type OptRes = Result<TestOpts, String>;
 
 #[cfg_attr(rustfmt, rustfmt_skip)]
 fn optgroups() -> Vec<getopts::OptGroup> {
-    vec!(getopts::optflag("", "ignored", "Run ignored tests"),
+    vec![getopts::optflag("", "ignored", "Run ignored tests"),
       getopts::optflag("", "test", "Run tests and not benchmarks"),
       getopts::optflag("", "bench", "Run benchmarks instead of tests"),
       getopts::optflag("h", "help", "Display this message (longer with --help)"),
@@ -352,7 +352,7 @@ fn optgroups() -> Vec<getopts::OptGroup> {
       getopts::optopt("", "color", "Configure coloring of output:
             auto   = colorize if stdout is a tty and tests are run on serially (default);
             always = always colorize output;
-            never  = never colorize output;", "auto|always|never"))
+            never  = never colorize output;", "auto|always|never")]
 }
 
 fn usage(binary: &str) {