Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve needless_borrow clippy lints
error: this expression borrows a reference (`&syn::Type`) that is immediately dereferenced by the compiler --> serde_derive/src/internals/check.rs:399:37 | 399 | if let Type::Path(ty) = ungroup(&field.ty) { | ^^^^^^^^^ help: change this to: `field.ty` | note: the lint level is defined here --> serde_derive/src/lib.rs:18:9 | 18 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^ = note: `#[deny(clippy::needless_borrow)]` implied by `#[deny(clippy::all)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler --> serde_derive/src/de.rs:478:52 | 478 | &type_path, params, fields, false, cattrs, &expecting, | ^^^^^^^^^^ help: change this to: `expecting` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler --> serde_derive/src/de.rs:564:76 | 564 | let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting)); | ^^^^^^^^^^ help: change this to: `expecting` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler --> serde_derive/src/de.rs:925:51 | 925 | &type_path, params, fields, true, cattrs, &expecting, | ^^^^^^^^^^ help: change this to: `expecting` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler --> serde_derive/src/de.rs:1066:76 | 1066 | let visit_seq = Stmts(deserialize_seq_in_place(params, fields, cattrs, &expecting)); | ^^^^^^^^^^ help: change this to: `expecting` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a reference (`&proc_macro2::TokenStream`) that is immediately dereferenced by the compiler --> serde_derive/src/de.rs:2288:80 | 2288 | let fallthrough_borrowed_arm = fallthrough_borrowed.as_ref().unwrap_or(&fallthrough_arm); | ^^^^^^^^^^^^^^^^ help: change this to: `fallthrough_arm` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow error: this expression borrows a reference (`&syn::Member`) that is immediately dereferenced by the compiler --> serde_derive/src/ser.rs:1102:43 | 1102 | get_member(params, field, &member) | ^^^^^^^ help: change this to: `member` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
- Loading branch information