Skip to content

Commit

Permalink
Resolve redundant_field_names lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 18, 2019
1 parent 581a237 commit 71290bc
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ where
// https://github.com/dtolnay/serde-ignored/pull/1
pub fn new(de: D, callback: &'b mut F) -> Self {
Deserializer {
de: de,
callback: callback,
de,
callback,
path: Path::Root,
}
}
Expand Down Expand Up @@ -421,9 +421,9 @@ struct Wrap<'a, 'b, X, F: 'b> {
impl<'a, 'b, X, F> Wrap<'a, 'b, X, F> {
fn new(delegate: X, callback: &'b mut F, path: &'a Path<'a>) -> Self {
Wrap {
delegate: delegate,
callback: callback,
path: path,
delegate,
callback,
path,
}
}
}
Expand Down Expand Up @@ -699,10 +699,7 @@ struct CaptureKey<'a, X> {

impl<'a, X> CaptureKey<'a, X> {
fn new(delegate: X, key: &'a mut Option<String>) -> Self {
CaptureKey {
delegate: delegate,
key: key,
}
CaptureKey { delegate, key }
}
}

Expand Down Expand Up @@ -1186,9 +1183,9 @@ struct TrackedSeed<'a, X, F: 'a> {
impl<'a, X, F> TrackedSeed<'a, X, F> {
fn new(seed: X, callback: &'a mut F, path: Path<'a>) -> Self {
TrackedSeed {
seed: seed,
callback: callback,
path: path,
seed,
callback,
path,
}
}
}
Expand Down Expand Up @@ -1223,9 +1220,9 @@ struct SeqAccess<'a, 'b, X, F: 'b> {
impl<'a, 'b, X, F> SeqAccess<'a, 'b, X, F> {
fn new(delegate: X, callback: &'b mut F, path: &'a Path<'a>) -> Self {
SeqAccess {
delegate: delegate,
callback: callback,
path: path,
delegate,
callback,
path,
index: 0,
}
}
Expand Down Expand Up @@ -1269,9 +1266,9 @@ struct MapAccess<'a, 'b, X, F: 'b> {
impl<'a, 'b, X, F> MapAccess<'a, 'b, X, F> {
fn new(delegate: X, callback: &'b mut F, path: &'a Path<'a>) -> Self {
MapAccess {
delegate: delegate,
callback: callback,
path: path,
delegate,
callback,
path,
key: None,
}
}
Expand Down

0 comments on commit 71290bc

Please sign in to comment.