mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-27 18:07:57 +00:00
Resolve needless_lifetimes clippy lints
error: the following explicit lifetimes could be elided: 'a
--> serde_derive/src/ser.rs:869:1
|
869 | / fn serialize_struct_variant<'a>(
870 | | context: StructVariant<'a>,
871 | | params: &Parameters,
872 | | fields: &[Field],
873 | | name: &str,
874 | | ) -> Fragment {
| |_____________^
|
help: replace with `'_` in generic arguments such as here
--> serde_derive/src/ser.rs:870:28
|
870 | context: StructVariant<'a>,
| ^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-D clippy::needless-lifetimes` implied by `-D clippy::all`
error: the following explicit lifetimes could be elided: 'a
--> serde_derive/src/ser.rs:953:1
|
953 | / fn serialize_struct_variant_with_flatten<'a>(
954 | | context: StructVariant<'a>,
955 | | params: &Parameters,
956 | | fields: &[Field],
957 | | name: &str,
958 | | ) -> Fragment {
| |_____________^
|
help: replace with `'_` in generic arguments such as here
--> serde_derive/src/ser.rs:954:28
|
954 | context: StructVariant<'a>,
| ^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
This commit is contained in:
@@ -866,8 +866,8 @@ enum StructVariant<'a> {
|
||||
Untagged,
|
||||
}
|
||||
|
||||
fn serialize_struct_variant<'a>(
|
||||
context: StructVariant<'a>,
|
||||
fn serialize_struct_variant(
|
||||
context: StructVariant,
|
||||
params: &Parameters,
|
||||
fields: &[Field],
|
||||
name: &str,
|
||||
@@ -950,8 +950,8 @@ fn serialize_struct_variant<'a>(
|
||||
}
|
||||
}
|
||||
|
||||
fn serialize_struct_variant_with_flatten<'a>(
|
||||
context: StructVariant<'a>,
|
||||
fn serialize_struct_variant_with_flatten(
|
||||
context: StructVariant,
|
||||
params: &Parameters,
|
||||
fields: &[Field],
|
||||
name: &str,
|
||||
|
||||
Reference in New Issue
Block a user