Skip to content
Myr

Fix needless_borrow for both value=Cow<str> and value=&str

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

authored by David Tolnay · committed by David Tolnay · parent dc84693 · 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