Address redundant_field_names lint

This commit is contained in:
David Tolnay 2018-09-15 10:03:55 -07:00
parent 760f4f86d0
commit 1f0d33259b
3 changed files with 5 additions and 10 deletions

View file

@ -5,7 +5,7 @@ matrix:
- rust: stable
- rust: beta
- rust: nightly
- rust: 1.13.0
- rust: 1.17.0
script: cargo build
- rust: 1.22.1
- rust: nightly

View file

@ -113,10 +113,9 @@ fn escape_str(wr: &mut fmt::Write, v: &str) -> Result<(), fmt::Error> {
impl<'a> YamlEmitter<'a> {
pub fn new(writer: &'a mut fmt::Write) -> YamlEmitter {
YamlEmitter {
writer: writer,
writer,
best_indent: 2,
compact: true,
level: -1,
}
}

View file

@ -27,11 +27,7 @@ pub struct Marker {
impl Marker {
fn new(index: usize, line: usize, col: usize) -> Marker {
Marker {
index: index,
line: line,
col: col,
}
Marker { index, line, col }
}
pub fn index(&self) -> usize {
@ -135,7 +131,7 @@ impl SimpleKey {
possible: false,
required: false,
token_number: 0,
mark: mark,
mark,
}
}
}
@ -227,7 +223,7 @@ impl<T: Iterator<Item = char>> Scanner<T> {
/// Creates the YAML tokenizer.
pub fn new(rdr: T) -> Scanner<T> {
Scanner {
rdr: rdr,
rdr,
buffer: VecDeque::new(),
mark: Marker::new(0, 1, 0),
tokens: VecDeque::new(),