Skip to content
Myr

Resolve needless_borrow clippy lint

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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

authored by David Tolnay · committed by David Tolnay · parent 4cf012c · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:serde/src/de/impls.rs+2 added-2 removed
2010 unmodified lines
2011 b"secs" => Ok(Field::Secs),2012 b"nanos" => Ok(Field::Nanos),2013 _ => {2014 let value = ::__private::from_utf8_lossy(value);2015 Err(Error::unknown_field(&value, FIELDS))2015 Err(Error::unknown_field(value, FIELDS))2016 }2017 }2018 }2019 }
331 unmodified lines
2351 b"start" => Ok(Field::Start),2352 b"end" => Ok(Field::End),2353 _ => {2354 let value = ::__private::from_utf8_lossy(value);2355 Err(Error::unknown_field(&value, FIELDS))2355 Err(Error::unknown_field(value, FIELDS))2356 }2357 }2358 }2359 }
367 unmodified lines