1
Fork 0

use field init shorthand EVERYWHERE

Like #43008 (f668999), but _much more aggressive_.
This commit is contained in:
Zack M. Davis 2017-08-06 22:54:09 -07:00
parent 82be83cf74
commit 1b6c9605e4
281 changed files with 1376 additions and 1376 deletions

View file

@ -265,7 +265,7 @@ pub mod printf {
/// Returns an iterator over all substitutions in a given string.
pub fn iter_subs(s: &str) -> Substitutions {
Substitutions {
s: s,
s,
}
}
@ -553,12 +553,12 @@ pub mod printf {
let f = Format {
span: start.slice_between(end).unwrap(),
parameter: parameter,
flags: flags,
width: width,
precision: precision,
length: length,
type_: type_,
parameter,
flags,
width,
precision,
length,
type_,
};
Some((Substitution::Format(f), end.slice_after()))
}
@ -776,7 +776,7 @@ pub mod shell {
/// Returns an iterator over all substitutions in a given string.
pub fn iter_subs(s: &str) -> Substitutions {
Substitutions {
s: s,
s,
}
}
@ -933,7 +933,7 @@ mod strcursor {
impl<'a> StrCursor<'a> {
pub fn new_at_start(s: &'a str) -> StrCursor<'a> {
StrCursor {
s: s,
s,
at: 0,
}
}