warning: variables can be used directly in the `format!` string
--> src/ser.rs:448:15
|
448 | match write!(adapter, "{}", value) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
|
448 - match write!(adapter, "{}", value) {
448 + match write!(adapter, "{value}") {
|
warning: variables can be used directly in the `format!` string
--> src/value/mod.rs:182:37
|
182 | Value::Bool(boolean) => write!(formatter, "Bool({})", boolean),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
182 - Value::Bool(boolean) => write!(formatter, "Bool({})", boolean),
182 + Value::Bool(boolean) => write!(formatter, "Bool({boolean})"),
|
warning: variables can be used directly in the `format!` string
--> src/value/mod.rs:184:38
|
184 | Value::String(string) => write!(formatter, "String({:?})", string),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
184 - Value::String(string) => write!(formatter, "String({:?})", string),
184 + Value::String(string) => write!(formatter, "String({string:?})"),
|
warning: variables can be used directly in the `format!` string
--> src/number.rs:365:9
|
365 | write!(formatter, "Number({})", self)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
365 - write!(formatter, "Number({})", self)
365 + write!(formatter, "Number({self})")
|
warning: the following explicit lifetimes could be elided: 'a
--> src/de.rs:2189:11
|
2189 | impl<'de, 'a, R> MapKey<'a, R>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
= note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]`
help: elide the lifetimes
|
2189 - impl<'de, 'a, R> MapKey<'a, R>
2189 + impl<'de, R> MapKey<'_, R>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/de.rs:2196:11
|
2196 | impl<'de, 'a, R> de::Deserializer<'de> for MapKey<'a, R>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
2196 - impl<'de, 'a, R> de::Deserializer<'de> for MapKey<'a, R>
2196 + impl<'de, R> de::Deserializer<'de> for MapKey<'_, R>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/error.rs:467:6
|
467 | impl<'a> Display for JsonUnexpected<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
467 - impl<'a> Display for JsonUnexpected<'a> {
467 + impl Display for JsonUnexpected<'_> {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/map.rs:601:6
|
601 | impl<'de> de::IntoDeserializer<'de, Error> for Map<String, Value> {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
601 - impl<'de> de::IntoDeserializer<'de, Error> for Map<String, Value> {
601 + impl de::IntoDeserializer<'_, Error> for Map<String, Value> {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:31:6
|
31 | impl<'a, W> Serializer<W, PrettyFormatter<'a>>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
31 - impl<'a, W> Serializer<W, PrettyFormatter<'a>>
31 + impl<W> Serializer<W, PrettyFormatter<'_>>
|
warning: the following explicit lifetimes could be elided: 'ser
--> src/ser.rs:420:14
|
420 | impl<'ser, W, F> Write for Adapter<'ser, W, F>
| ^^^^ ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
420 - impl<'ser, W, F> Write for Adapter<'ser, W, F>
420 + impl<W, F> Write for Adapter<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:480:6
|
480 | impl<'a, W, F> ser::SerializeSeq for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
480 - impl<'a, W, F> ser::SerializeSeq for Compound<'a, W, F>
480 + impl<W, F> ser::SerializeSeq for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:527:6
|
527 | impl<'a, W, F> ser::SerializeTuple for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
527 - impl<'a, W, F> ser::SerializeTuple for Compound<'a, W, F>
527 + impl<W, F> ser::SerializeTuple for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:549:6
|
549 | impl<'a, W, F> ser::SerializeTupleStruct for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
549 - impl<'a, W, F> ser::SerializeTupleStruct for Compound<'a, W, F>
549 + impl<W, F> ser::SerializeTupleStruct for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:571:6
|
571 | impl<'a, W, F> ser::SerializeTupleVariant for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
571 - impl<'a, W, F> ser::SerializeTupleVariant for Compound<'a, W, F>
571 + impl<W, F> ser::SerializeTupleVariant for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:609:6
|
609 | impl<'a, W, F> ser::SerializeMap for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
609 - impl<'a, W, F> ser::SerializeMap for Compound<'a, W, F>
609 + impl<W, F> ser::SerializeMap for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:681:6
|
681 | impl<'a, W, F> ser::SerializeStruct for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
681 - impl<'a, W, F> ser::SerializeStruct for Compound<'a, W, F>
681 + impl<W, F> ser::SerializeStruct for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:727:6
|
727 | impl<'a, W, F> ser::SerializeStructVariant for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
727 - impl<'a, W, F> ser::SerializeStructVariant for Compound<'a, W, F>
727 + impl<W, F> ser::SerializeStructVariant for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:793:6
|
793 | impl<'a, W, F> ser::Serializer for MapKeySerializer<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
793 - impl<'a, W, F> ser::Serializer for MapKeySerializer<'a, W, F>
793 + impl<W, F> ser::Serializer for MapKeySerializer<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:1979:6
|
1979 | impl<'a> Default for PrettyFormatter<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
1979 - impl<'a> Default for PrettyFormatter<'a> {
1979 + impl Default for PrettyFormatter<'_> {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:1985:6
|
1985 | impl<'a> Formatter for PrettyFormatter<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
1985 - impl<'a> Formatter for PrettyFormatter<'a> {
1985 + impl Formatter for PrettyFormatter<'_> {
|
warning: the following explicit lifetimes could be elided: 'a, 'b
--> src/value/mod.rs:227:14
|
227 | impl<'a, 'b> io::Write for WriterFormatter<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
227 - impl<'a, 'b> io::Write for WriterFormatter<'a, 'b> {
227 + impl io::Write for WriterFormatter<'_, '_> {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/value/de.rs:526:6
|
526 | impl<'de> IntoDeserializer<'de, Error> for Value {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
526 - impl<'de> IntoDeserializer<'de, Error> for Value {
526 + impl IntoDeserializer<'_, Error> for Value {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/value/de.rs:1343:6
|
1343 | impl<'de> Visitor<'de> for KeyClassifier {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
1343 - impl<'de> Visitor<'de> for KeyClassifier {
1343 + impl Visitor<'_> for KeyClassifier {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/value/index.rs:146:6
|
146 | impl<'a> Display for Type<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
146 - impl<'a> Display for Type<'a> {
146 + impl Display for Type<'_> {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/number.rs:403:14
|
403 | impl<'de> Visitor<'de> for NumberVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
403 - impl<'de> Visitor<'de> for NumberVisitor {
403 + impl Visitor<'_> for NumberVisitor {
|
warning: the following explicit lifetimes could be elided: 'b, 'c
--> src/read.rs:132:6
|
132 | impl<'b, 'c, T> Deref for Reference<'b, 'c, T>
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
132 - impl<'b, 'c, T> Deref for Reference<'b, 'c, T>
132 + impl<T> Deref for Reference<'_, '_, T>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:541:6
|
541 | impl<'a> private::Sealed for SliceRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
541 - impl<'a> private::Sealed for SliceRead<'a> {}
541 + impl private::Sealed for SliceRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:679:6
|
679 | impl<'a> private::Sealed for StrRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
679 - impl<'a> private::Sealed for StrRead<'a> {}
679 + impl private::Sealed for StrRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:833:6
|
833 | impl<'a> Fused for SliceRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
833 - impl<'a> Fused for SliceRead<'a> {}
833 + impl Fused for SliceRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:834:6
|
834 | impl<'a> Fused for StrRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
help: elide the lifetimes
|
834 - impl<'a> Fused for StrRead<'a> {}
834 + impl Fused for StrRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'de
--> tests/regression/issue845.rs:12:6
|
12 | impl<'de, T> serde:🇩🇪:Visitor<'de> for NumberVisitor<T>
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names
= note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]`
help: elide the lifetimes
|
12 - impl<'de, T> serde:🇩🇪:Visitor<'de> for NumberVisitor<T>
12 + impl<T> serde:🇩🇪:Visitor<'_> for NumberVisitor<T>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/de.rs:2169:11
|
2169 | impl<'de, 'a, R> MapKey<'a, R>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
|
2169 - impl<'de, 'a, R> MapKey<'a, R>
2169 + impl<'de, R> MapKey<'_, R>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/de.rs:2176:11
|
2176 | impl<'de, 'a, R> de::Deserializer<'de> for MapKey<'a, R>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
2176 - impl<'de, 'a, R> de::Deserializer<'de> for MapKey<'a, R>
2176 + impl<'de, R> de::Deserializer<'de> for MapKey<'_, R>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/error.rs:467:6
|
467 | impl<'a> Display for JsonUnexpected<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
467 - impl<'a> Display for JsonUnexpected<'a> {
467 + impl Display for JsonUnexpected<'_> {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:31:6
|
31 | impl<'a, W> Serializer<W, PrettyFormatter<'a>>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
31 - impl<'a, W> Serializer<W, PrettyFormatter<'a>>
31 + impl<W> Serializer<W, PrettyFormatter<'_>>
|
warning: the following explicit lifetimes could be elided: 'ser
--> src/ser.rs:420:14
|
420 | impl<'ser, W, F> Write for Adapter<'ser, W, F>
| ^^^^ ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
420 - impl<'ser, W, F> Write for Adapter<'ser, W, F>
420 + impl<W, F> Write for Adapter<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:480:6
|
480 | impl<'a, W, F> ser::SerializeSeq for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
480 - impl<'a, W, F> ser::SerializeSeq for Compound<'a, W, F>
480 + impl<W, F> ser::SerializeSeq for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:527:6
|
527 | impl<'a, W, F> ser::SerializeTuple for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
527 - impl<'a, W, F> ser::SerializeTuple for Compound<'a, W, F>
527 + impl<W, F> ser::SerializeTuple for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:549:6
|
549 | impl<'a, W, F> ser::SerializeTupleStruct for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
549 - impl<'a, W, F> ser::SerializeTupleStruct for Compound<'a, W, F>
549 + impl<W, F> ser::SerializeTupleStruct for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:571:6
|
571 | impl<'a, W, F> ser::SerializeTupleVariant for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
571 - impl<'a, W, F> ser::SerializeTupleVariant for Compound<'a, W, F>
571 + impl<W, F> ser::SerializeTupleVariant for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:609:6
|
609 | impl<'a, W, F> ser::SerializeMap for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
609 - impl<'a, W, F> ser::SerializeMap for Compound<'a, W, F>
609 + impl<W, F> ser::SerializeMap for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:681:6
|
681 | impl<'a, W, F> ser::SerializeStruct for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
681 - impl<'a, W, F> ser::SerializeStruct for Compound<'a, W, F>
681 + impl<W, F> ser::SerializeStruct for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:727:6
|
727 | impl<'a, W, F> ser::SerializeStructVariant for Compound<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
727 - impl<'a, W, F> ser::SerializeStructVariant for Compound<'a, W, F>
727 + impl<W, F> ser::SerializeStructVariant for Compound<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:793:6
|
793 | impl<'a, W, F> ser::Serializer for MapKeySerializer<'a, W, F>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
793 - impl<'a, W, F> ser::Serializer for MapKeySerializer<'a, W, F>
793 + impl<W, F> ser::Serializer for MapKeySerializer<'_, W, F>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:1157:6
|
1157 | impl<'a, W: io::Write, F: Formatter> ser::Serializer for NumberStrEmitter<'a, W, F> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1157 - impl<'a, W: io::Write, F: Formatter> ser::Serializer for NumberStrEmitter<'a, W, F> {
1157 + impl<W: io::Write, F: Formatter> ser::Serializer for NumberStrEmitter<'_, W, F> {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:1334:6
|
1334 | impl<'a, W: io::Write, F: Formatter> ser::Serializer for RawValueStrEmitter<'a, W, F> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1334 - impl<'a, W: io::Write, F: Formatter> ser::Serializer for RawValueStrEmitter<'a, W, F> {
1334 + impl<W: io::Write, F: Formatter> ser::Serializer for RawValueStrEmitter<'_, W, F> {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:1951:6
|
1951 | impl<'a> Default for PrettyFormatter<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1951 - impl<'a> Default for PrettyFormatter<'a> {
1951 + impl Default for PrettyFormatter<'_> {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/ser.rs:1957:6
|
1957 | impl<'a> Formatter for PrettyFormatter<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1957 - impl<'a> Formatter for PrettyFormatter<'a> {
1957 + impl Formatter for PrettyFormatter<'_> {
|
warning: the following explicit lifetimes could be elided: 'a, 'b
--> src/value/mod.rs:227:14
|
227 | impl<'a, 'b> io::Write for WriterFormatter<'a, 'b> {
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
227 - impl<'a, 'b> io::Write for WriterFormatter<'a, 'b> {
227 + impl io::Write for WriterFormatter<'_, '_> {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/value/de.rs:479:6
|
479 | impl<'de> IntoDeserializer<'de, Error> for Value {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
479 - impl<'de> IntoDeserializer<'de, Error> for Value {
479 + impl IntoDeserializer<'_, Error> for Value {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/value/de.rs:1266:6
|
1266 | impl<'de> Visitor<'de> for KeyClassifier {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
1266 - impl<'de> Visitor<'de> for KeyClassifier {
1266 + impl Visitor<'_> for KeyClassifier {
|
warning: the following explicit lifetimes could be elided: 'a
--> src/value/index.rs:146:6
|
146 | impl<'a> Display for Type<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
146 - impl<'a> Display for Type<'a> {
146 + impl Display for Type<'_> {
|
Checking toml v0.8.19
warning: the following explicit lifetimes could be elided: 'de
--> src/number.rs:460:14
|
460 | impl<'de> de::Visitor<'de> for FieldVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
460 - impl<'de> de::Visitor<'de> for FieldVisitor {
460 + impl de::Visitor<'_> for FieldVisitor {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/number.rs:497:14
|
497 | impl<'de> de::Visitor<'de> for Visitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
497 - impl<'de> de::Visitor<'de> for Visitor {
497 + impl de::Visitor<'_> for Visitor {
|
warning: the following explicit lifetimes could be elided: 'b, 'c
--> src/read.rs:132:6
|
132 | impl<'b, 'c, T> Deref for Reference<'b, 'c, T>
| ^^ ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
132 - impl<'b, 'c, T> Deref for Reference<'b, 'c, T>
132 + impl<T> Deref for Reference<'_, '_, T>
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:535:6
|
535 | impl<'a> private::Sealed for SliceRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
535 - impl<'a> private::Sealed for SliceRead<'a> {}
535 + impl private::Sealed for SliceRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:673:6
|
673 | impl<'a> private::Sealed for StrRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
673 - impl<'a> private::Sealed for StrRead<'a> {}
673 + impl private::Sealed for StrRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:827:6
|
827 | impl<'a> Fused for SliceRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
827 - impl<'a> Fused for SliceRead<'a> {}
827 + impl Fused for SliceRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'a
--> src/read.rs:828:6
|
828 | impl<'a> Fused for StrRead<'a> {}
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
828 - impl<'a> Fused for StrRead<'a> {}
828 + impl Fused for StrRead<'_> {}
|
warning: the following explicit lifetimes could be elided: 'de
--> src/raw.rs:374:14
|
374 | impl<'de> Visitor<'de> for FieldVisitor {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
374 - impl<'de> Visitor<'de> for FieldVisitor {
374 + impl Visitor<'_> for FieldVisitor {
|
warning: the following explicit lifetimes could be elided: 'de
--> src/raw.rs:439:6
|
439 | impl<'de> Visitor<'de> for BoxedFromString {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
439 - impl<'de> Visitor<'de> for BoxedFromString {
439 + impl Visitor<'_> for BoxedFromString {
|
warning: the following explicit lifetimes could be elided: 'de
--> tests/regression/issue845.rs:12:6
|
12 | impl<'de, T> serde:🇩🇪:Visitor<'de> for NumberVisitor<T>
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
|
12 - impl<'de, T> serde:🇩🇪:Visitor<'de> for NumberVisitor<T>
12 + impl<T> serde:🇩🇪:Visitor<'_> for NumberVisitor<T>
|
Closes#877.
This is a good time to make ByteBuf parsing more consistent as I'm
rewriting it anyway. This commit integrates the changes from #877 and
also handles a leading surrogate followed by a surrogate pair correctly.
This does not affect performance significantly.
Co-authored-by: Luca Casonato <hello@lcas.dev>
When ignoring *War and Peace* (in Russian), this increases performance
from 640 MB/s to 1080 MB/s (+70%).
When parsing into String, the savings are moderate but still
significant: 275 MB/s to 320 MB/s (+15%).
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> tests/test.rs:2515:9
|
2515 | &"\"\t\n\r\"",
| ^^^^^^^^^^^^^ help: change this to: `"\"\t\n\r\""`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-W clippy::needless-borrow` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`
warning: can be more succinctly written as a byte str
--> tests/test.rs:1108:13
|
1108 | &[b'"', b'\n', b'"'],
| ^^^^^^^^^^^^^^^^^^^^ help: try: `b"\"\n\""`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices
= note: `-W clippy::byte-char-slices` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::byte_char_slices)]`
warning: can be more succinctly written as a byte str
--> tests/test.rs:1112:13
|
1112 | &[b'"', b'\x1F', b'"'],
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `b"\"\x1F\""`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices
This method inserts a key-value pair in the map at the given index. If
the map did not have this key present, `None` is returned. If the map
did have this key present, the key is moved to the new position, the
value is updated, and the old value is returned.
This is useful when you want to insert a key-value pair at a specific
position in the map, and is a necessary method when writing a JSON
editor that can mutate the keys in a JSON object.
warning: associated constant `SIGN_MASK` is never used
--> src/lexical/num.rs:210:11
|
175 | pub trait Float: Number {
| ----- associated constant in this trait
...
210 | const SIGN_MASK: Self::Unsigned;
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: digit groups should be smaller
--> tests/test.rs:962:9
|
962 | 51.24817837550540_4, // 51.2481783755054_1
| ^^^^^^^^^^^^^^^^^^^ help: consider: `51.248_178_375_505_404`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_digit_groups
= note: `-W clippy::large-digit-groups` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::large_digit_groups)]`
warning: digit groups should be smaller
--> tests/test.rs:963:10
|
963 | -93.3113703768803_3, // -93.3113703768803_2
| ^^^^^^^^^^^^^^^^^^ help: consider: `93.311_370_376_880_33`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_digit_groups
warning: digit groups should be smaller
--> tests/test.rs:964:10
|
964 | -36.5739948427534_36, // -36.5739948427534_4
| ^^^^^^^^^^^^^^^^^^^ help: consider: `36.573_994_842_753_436`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_digit_groups
warning: digit groups should be smaller
--> tests/test.rs:965:9
|
965 | 52.31400820410624_4, // 52.31400820410624_
| ^^^^^^^^^^^^^^^^^^^ help: consider: `52.314_008_204_106_244`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_digit_groups
warning: digit groups should be smaller
--> tests/test.rs:966:9
|
966 | 97.4536532003468_5, // 97.4536532003468_4
| ^^^^^^^^^^^^^^^^^^ help: consider: `97.453_653_200_346_85`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_digit_groups
warning: unnecessary hashes around raw string literal
--> tests/test.rs:2313:16
|
2313 | assert_eq!(r#"42"#, array_from_str[1].get());
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
= note: `-W clippy::needless-raw-string-hashes` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_raw_string_hashes)]`
help: remove all the hashes around the string literal
|
2313 - assert_eq!(r#"42"#, array_from_str[1].get());
2313 + assert_eq!(r"42", array_from_str[1].get());
|
warning: unnecessary hashes around raw string literal
--> tests/test.rs:2315:16
|
2315 | assert_eq!(r#"null"#, array_from_str[3].get());
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
help: remove all the hashes around the string literal
|
2315 - assert_eq!(r#"null"#, array_from_str[3].get());
2315 + assert_eq!(r"null", array_from_str[3].get());
|
warning: unnecessary hashes around raw string literal
--> tests/test.rs:2392:16
|
2392 | assert_eq!(r#"42"#, array_from_str[1].get());
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
help: remove all the hashes around the string literal
|
2392 - assert_eq!(r#"42"#, array_from_str[1].get());
2392 + assert_eq!(r"42", array_from_str[1].get());
|
warning: unnecessary hashes around raw string literal
--> tests/test.rs:2394:16
|
2394 | assert_eq!(r#"null"#, array_from_str[3].get());
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
help: remove all the hashes around the string literal
|
2394 - assert_eq!(r#"null"#, array_from_str[3].get());
2394 + assert_eq!(r"null", array_from_str[3].get());
|
warning: unnecessary hashes around raw string literal
--> tests/test.rs:2399:16
|
2399 | assert_eq!(r#"42"#, array_from_reader[1].get());
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
help: remove all the hashes around the string literal
|
2399 - assert_eq!(r#"42"#, array_from_reader[1].get());
2399 + assert_eq!(r"42", array_from_reader[1].get());
|
warning: unnecessary hashes around raw string literal
--> tests/test.rs:2401:16
|
2401 | assert_eq!(r#"null"#, array_from_reader[3].get());
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
help: remove all the hashes around the string literal
|
2401 - assert_eq!(r#"null"#, array_from_reader[3].get());
2401 + assert_eq!(r"null", array_from_reader[3].get());
|
warning: usage of a legacy numeric method
--> src/de.rs:484:73
|
484 | ... if overflow!(significand * 10 + digit, u64::max_value()) {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
|
484 | if overflow!(significand * 10 + digit, u64::MAX) {
| ~~~
warning: usage of a legacy numeric method
--> src/de.rs:536:57
|
536 | if overflow!(significand * 10 + digit, u64::max_value()) {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
536 | if overflow!(significand * 10 + digit, u64::MAX) {
| ~~~
warning: usage of a legacy numeric method
--> src/de.rs:600:49
|
600 | if overflow!(exp * 10 + digit, i32::max_value()) {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
600 | if overflow!(exp * 10 + digit, i32::MAX) {
| ~~~
warning: usage of a legacy numeric method
--> src/number.rs💯39
|
100 | N::PosInt(v) => v <= i64::max_value() as u64,
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
100 | N::PosInt(v) => v <= i64::MAX as u64,
| ~~~
warning: usage of a legacy numeric method
--> src/number.rs:192:30
|
192 | if n <= i64::max_value() as u64 {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
192 | if n <= i64::MAX as u64 {
| ~~~
warning: usage of a legacy numeric method
--> tests/../src/lexical/exponent.rs:11:21
|
11 | if value > i32::max_value() as usize {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
|
11 | if value > i32::MAX as usize {
| ~~~
warning: usage of a legacy numeric method
--> tests/../src/lexical/exponent.rs:12:14
|
12 | i32::max_value()
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
12 | i32::MAX
| ~~~
warning: usage of a legacy numeric method
--> tests/../src/lexical/rounding.rs:28:14
|
28 | u64::max_value()
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
28 | u64::MAX
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:21:34
|
21 | scientific_exponent(i32::min_value(), 0, 0),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
21 | scientific_exponent(i32::MIN, 0, 0),
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:22:14
|
22 | i32::min_value()
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
22 | i32::MIN
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:25:34
|
25 | scientific_exponent(i32::min_value(), 0, 5),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
25 | scientific_exponent(i32::MIN, 0, 5),
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:26:14
|
26 | i32::min_value()
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
26 | i32::MIN
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:31:34
|
31 | scientific_exponent(i32::max_value(), 0, 0),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
31 | scientific_exponent(i32::MAX, 0, 0),
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:32:14
|
32 | i32::max_value() - 1
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
32 | i32::MAX - 1
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:35:34
|
35 | scientific_exponent(i32::max_value(), 5, 0),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
35 | scientific_exponent(i32::MAX, 5, 0),
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:36:14
|
36 | i32::max_value()
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
36 | i32::MAX
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:45:32
|
45 | mantissa_exponent(i32::max_value(), 5, 0),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
45 | mantissa_exponent(i32::MAX, 5, 0),
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:46:14
|
46 | i32::max_value() - 5
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
46 | i32::MAX - 5
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:48:39
|
48 | assert_eq!(mantissa_exponent(i32::max_value(), 0, 5), i32::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
48 | assert_eq!(mantissa_exponent(i32::MAX, 0, 5), i32::max_value());
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:48:64
|
48 | assert_eq!(mantissa_exponent(i32::max_value(), 0, 5), i32::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
48 | assert_eq!(mantissa_exponent(i32::max_value(), 0, 5), i32::MAX);
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:49:39
|
49 | assert_eq!(mantissa_exponent(i32::min_value(), 5, 0), i32::min_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
49 | assert_eq!(mantissa_exponent(i32::MIN, 5, 0), i32::min_value());
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:49:64
|
49 | assert_eq!(mantissa_exponent(i32::min_value(), 5, 0), i32::min_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
49 | assert_eq!(mantissa_exponent(i32::min_value(), 5, 0), i32::MIN);
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:51:32
|
51 | mantissa_exponent(i32::min_value(), 0, 5),
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
51 | mantissa_exponent(i32::MIN, 0, 5),
| ~~~
warning: usage of a legacy numeric method
--> tests/lexical/exponent.rs:52:14
|
52 | i32::min_value() + 5
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
52 | i32::MIN + 5
| ~~~
warning: importing legacy numeric constants
--> tests/test.rs:47:11
|
47 | use std::{i16, i32, i64, i8};
| ^^^
|
= help: remove this import
= note: then `i16::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `#[warn(clippy::legacy_numeric_constants)]` on by default
warning: importing legacy numeric constants
--> tests/test.rs:47:16
|
47 | use std::{i16, i32, i64, i8};
| ^^^
|
= help: remove this import
= note: then `i32::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
warning: importing legacy numeric constants
--> tests/test.rs:47:21
|
47 | use std::{i16, i32, i64, i8};
| ^^^
|
= help: remove this import
= note: then `i64::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
warning: importing legacy numeric constants
--> tests/test.rs:47:26
|
47 | use std::{i16, i32, i64, i8};
| ^^
|
= help: remove this import
= note: then `i8::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
warning: importing legacy numeric constants
--> tests/test.rs:48:11
|
48 | use std::{u16, u32, u64, u8};
| ^^^
|
= help: remove this import
= note: then `u16::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
warning: importing legacy numeric constants
--> tests/test.rs:48:16
|
48 | use std::{u16, u32, u64, u8};
| ^^^
|
= help: remove this import
= note: then `u32::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
warning: importing legacy numeric constants
--> tests/test.rs:48:21
|
48 | use std::{u16, u32, u64, u8};
| ^^^
|
= help: remove this import
= note: then `u64::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
warning: importing legacy numeric constants
--> tests/test.rs:48:26
|
48 | use std::{u16, u32, u64, u8};
| ^^
|
= help: remove this import
= note: then `u8::<CONST>` will resolve to the respective associated constant
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
warning: usage of a legacy numeric constant
--> tests/test.rs:161:22
|
161 | let v = to_value(::std::f64::NAN.copysign(1.0)).unwrap();
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
161 | let v = to_value(f64::NAN.copysign(1.0)).unwrap();
| ~~~~~~~~
warning: usage of a legacy numeric constant
--> tests/test.rs:164:22
|
164 | let v = to_value(::std::f64::NAN.copysign(-1.0)).unwrap();
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
164 | let v = to_value(f64::NAN.copysign(-1.0)).unwrap();
| ~~~~~~~~
warning: usage of a legacy numeric constant
--> tests/test.rs:167:22
|
167 | let v = to_value(::std::f64::INFINITY).unwrap();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
167 | let v = to_value(f64::INFINITY).unwrap();
| ~~~~~~~~~~~~~
warning: usage of a legacy numeric constant
--> tests/test.rs:170:23
|
170 | let v = to_value(-::std::f64::INFINITY).unwrap();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
170 | let v = to_value(-f64::INFINITY).unwrap();
| ~~~~~~~~~~~~~
warning: usage of a legacy numeric constant
--> tests/test.rs:173:22
|
173 | let v = to_value(::std::f32::NAN.copysign(1.0)).unwrap();
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
173 | let v = to_value(f32::NAN.copysign(1.0)).unwrap();
| ~~~~~~~~
warning: usage of a legacy numeric constant
--> tests/test.rs:176:22
|
176 | let v = to_value(::std::f32::NAN.copysign(-1.0)).unwrap();
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
176 | let v = to_value(f32::NAN.copysign(-1.0)).unwrap();
| ~~~~~~~~
warning: usage of a legacy numeric constant
--> tests/test.rs:179:22
|
179 | let v = to_value(::std::f32::INFINITY).unwrap();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
179 | let v = to_value(f32::INFINITY).unwrap();
| ~~~~~~~~~~~~~
warning: usage of a legacy numeric constant
--> tests/test.rs:182:23
|
182 | let v = to_value(-::std::f32::INFINITY).unwrap();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
182 | let v = to_value(-f32::INFINITY).unwrap();
| ~~~~~~~~~~~~~
warning: usage of a legacy numeric method
--> tests/test.rs:2243:26
|
2243 | let signed = &[i128::min_value(), -1, 0, 1, i128::max_value()];
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
2243 | let signed = &[i128::MIN, -1, 0, 1, i128::max_value()];
| ~~~
warning: usage of a legacy numeric method
--> tests/test.rs:2243:55
|
2243 | let signed = &[i128::min_value(), -1, 0, 1, i128::max_value()];
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
2243 | let signed = &[i128::min_value(), -1, 0, 1, i128::MAX];
| ~~~
warning: usage of a legacy numeric method
--> tests/test.rs:2244:34
|
2244 | let unsigned = &[0, 1, u128::max_value()];
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
2244 | let unsigned = &[0, 1, u128::MAX];
| ~~~
warning: usage of a legacy numeric method
--> tests/test.rs:2280:36
|
2280 | let signed = &[i128::from(i64::min_value()), i128::from(u64::max_value())];
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
2280 | let signed = &[i128::from(i64::MIN), i128::from(u64::max_value())];
| ~~~
warning: usage of a legacy numeric method
--> tests/test.rs:2280:66
|
2280 | let signed = &[i128::from(i64::min_value()), i128::from(u64::max_value())];
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
2280 | let signed = &[i128::from(i64::min_value()), i128::from(u64::MAX)];
| ~~~
warning: usage of a legacy numeric method
--> tests/test.rs:2281:41
|
2281 | let unsigned = &[0, u128::from(u64::max_value())];
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
2281 | let unsigned = &[0, u128::from(u64::MAX)];
| ~~~
warning: usage of a legacy numeric method
--> tests/test.rs:2294:44
|
2294 | let err = to_value(u128::from(u64::max_value()) + 1).unwrap_err();
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
2294 | let err = to_value(u128::from(u64::MAX) + 1).unwrap_err();
| ~~~
New in nightly-2024-03-24 from https://github.com/rust-lang/rust/pull/119552.
warning: field `x` is never read
--> tests/regression/issue795.rs:11:15
|
11 | Variant { x: u8 },
| ------- ^
| |
| field in this variant
|
= note: `#[warn(dead_code)]` on by default
warning: field `i` is never read
--> tests/regression/issue845.rs:63:9
|
61 | pub struct Struct {
| ------ field in this struct
62 | #[serde(deserialize_with = "deserialize_integer_or_string")]
63 | pub i: i64,
| ^
|
= note: `Struct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
https://github.com/rust-lang/rust/issues/121621
warning: non-local `impl` definition, they should be avoided as they go against expectation
--> tests/test.rs:2338:5
|
2338 | / impl<'de> Deserialize<'de> for &'de RawMapKey {
2339 | | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
2340 | | where
2341 | | D: serde::Deserializer<'de>,
... |
2345 | | }
2346 | | }
| |_____^
|
= help: move this `impl` block outside the of the current function `test_raw_value_in_map_key`
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
= note: `#[warn(non_local_definitions)]` on by default
https://github.com/rust-lang/rust/pull/117772
warning: the item `String` is imported redundantly
--> src/de.rs:8:5
|
8 | use alloc::string::String;
| ^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
|
= note: `#[warn(unused_imports)]` on by default
warning: the item `Vec` is imported redundantly
--> src/de.rs:9:5
|
9 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
warning: the item `Box` is imported redundantly
--> src/error.rs:4:5
|
4 | use alloc::boxed::Box;
| ^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Box` is already defined here
warning: the item `String` is imported redundantly
--> src/error.rs:5:21
|
5 | use alloc::string::{String, ToString};
| ^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `ToString` is imported redundantly
--> src/error.rs:5:29
|
5 | use alloc::string::{String, ToString};
| ^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToString` is already defined here
warning: the item `String` is imported redundantly
--> src/map.rs:10:5
|
10 | use alloc::string::String;
| ^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `indexmap` is imported redundantly
--> src/map.rs:23:16
|
23 | use indexmap::{self, IndexMap};
| ^^^^ the item `indexmap` is already defined here
|
= note: `#[warn(unused_imports)]` on by default
warning: the item `String` is imported redundantly
--> src/ser.rs:5:21
|
5 | use alloc::string::{String, ToString};
| ^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `ToString` is imported redundantly
--> src/ser.rs:5:29
|
5 | use alloc::string::{String, ToString};
| ^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToString` is already defined here
warning: the item `Vec` is imported redundantly
--> src/ser.rs:6:5
|
6 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
warning: the item `String` is imported redundantly
--> src/value/mod.rs:95:5
|
95 | use alloc::string::String;
| ^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `Vec` is imported redundantly
--> src/value/mod.rs:96:5
|
96 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
warning: the item `ToOwned` is imported redundantly
--> src/value/de.rs:5:26
|
5 | use alloc::borrow::{Cow, ToOwned};
| ^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToOwned` is already defined here
warning: the item `String` is imported redundantly
--> src/value/de.rs:6:5
|
6 | use alloc::string::String;
| ^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `Vec` is imported redundantly
--> src/value/de.rs:9:24
|
9 | use alloc::vec::{self, Vec};
| ^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
warning: the item `String` is imported redundantly
--> src/value/from.rs:5:21
|
5 | use alloc::string::{String, ToString};
| ^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `ToString` is imported redundantly
--> src/value/from.rs:5:29
|
5 | use alloc::string::{String, ToString};
| ^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToString` is already defined here
warning: the item `Vec` is imported redundantly
--> src/value/from.rs:6:5
|
6 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
warning: the item `ToOwned` is imported redundantly
--> src/value/index.rs:3:5
|
3 | use alloc::borrow::ToOwned;
| ^^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToOwned` is already defined here
warning: the item `String` is imported redundantly
--> src/value/index.rs:4:5
|
4 | use alloc::string::String;
| ^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `String` is imported redundantly
--> src/value/partial_eq.rs:2:5
|
2 | use alloc::string::String;
| ^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `ToOwned` is imported redundantly
--> src/value/ser.rs:4:5
|
4 | use alloc::borrow::ToOwned;
| ^^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToOwned` is already defined here
warning: the item `String` is imported redundantly
--> src/value/ser.rs:5:21
|
5 | use alloc::string::{String, ToString};
| ^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `String` is already defined here
warning: the item `ToString` is imported redundantly
--> src/value/ser.rs:5:29
|
5 | use alloc::string::{String, ToString};
| ^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToString` is already defined here
warning: the item `Vec` is imported redundantly
--> src/value/ser.rs:6:5
|
6 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
warning: the item `Vec` is imported redundantly
--> src/read.rs:2:5
|
2 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
warning: the item `ToString` is imported redundantly
--> tests/test.rs:46:5
|
46 | use std::string::ToString;
| ^^^^^^^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `ToString` is already defined here
|
= note: `#[warn(unused_imports)]` on by default
warning: the item `Vec` is imported redundantly
--> tests/../src/lexical/bignum.rs:6:5
|
6 | use alloc::vec::Vec;
| ^^^^^^^^^^^^^^^
|
::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:125:13
|
125 | pub use super::v1::*;
| --------- the item `Vec` is already defined here
|
= note: `#[warn(unused_imports)]` on by default
https://github.com/rust-lang/rust-clippy/issues/12257
warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
--> tests/test.rs:2500:25
|
2500 | assert_ne!(rand.hash_one(k1), rand.hash_one(k2));
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
= note: `-W clippy::incompatible-msrv` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::incompatible_msrv)]`
warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
--> tests/test.rs:2500:44
|
2500 | assert_ne!(rand.hash_one(k1), rand.hash_one(k2));
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
--> tests/test.rs:2503:25
|
2503 | assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
warning: current MSRV (Minimum Supported Rust Version) is `1.56.0` but this item is stable since `1.71.0`
--> tests/test.rs:2503:44
|
2503 | assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv