mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-24 20:27:57 +00:00
Resolve needless_borrow clippy lint
error: this expression creates a reference which is immediately dereferenced by the compiler
--> serde/src/de/impls.rs:2015:58
|
2015 | ... Err(Error::unknown_field(&value, FIELDS))
| ^^^^^^ help: change this to: `value`
|
= note: `-D clippy::needless-borrow` implied by `-D clippy::all`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: this expression creates a reference which is immediately dereferenced by the compiler
--> serde/src/de/impls.rs:2355:54
|
2355 | ... Err(Error::unknown_field(&value, FIELDS))
| ^^^^^^ help: change this to: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
This commit is contained in:
@@ -2012,7 +2012,7 @@ impl<'de> Deserialize<'de> for Duration {
|
||||
b"nanos" => Ok(Field::Nanos),
|
||||
_ => {
|
||||
let value = ::__private::from_utf8_lossy(value);
|
||||
Err(Error::unknown_field(&value, FIELDS))
|
||||
Err(Error::unknown_field(value, FIELDS))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2352,7 +2352,7 @@ mod range {
|
||||
b"end" => Ok(Field::End),
|
||||
_ => {
|
||||
let value = ::__private::from_utf8_lossy(value);
|
||||
Err(Error::unknown_field(&value, FIELDS))
|
||||
Err(Error::unknown_field(value, FIELDS))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user