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.
This commit is contained in:
parent
f26eedb571
commit
e593c3b893
189 changed files with 511 additions and 511 deletions
|
@ -21,7 +21,7 @@ fn main() {
|
|||
let mut a = 3; //~ ERROR: variable does not need to be mutable
|
||||
let mut a = 2; //~ ERROR: variable does not need to be mutable
|
||||
let mut b = 3; //~ ERROR: variable does not need to be mutable
|
||||
let mut a = vec!(3); //~ ERROR: variable does not need to be mutable
|
||||
let mut a = vec![3]; //~ ERROR: variable does not need to be mutable
|
||||
let (mut a, b) = (1, 2); //~ ERROR: variable does not need to be mutable
|
||||
let mut a; //~ ERROR: variable does not need to be mutable
|
||||
a = 3;
|
||||
|
@ -88,5 +88,5 @@ fn callback<F>(f: F) where F: FnOnce() {}
|
|||
#[allow(unused_mut)]
|
||||
fn foo(mut a: isize) {
|
||||
let mut a = 3;
|
||||
let mut b = vec!(2);
|
||||
let mut b = vec![2];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue