Switch all crates to edition 2021
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Oli Scherer · committed by Oli Scherer · parent 6ac8049 · Browse files · 6 files·+10 added−9 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+10 added−9 removed
- other:+10 added−9 removed
Provenance
- Commit
e3a4165- Tree
87d7750- Author
Oli Scherer <github333195615777966@oli-obk.de>- Committer
Oli Scherer <github333195615777966@oli-obk.de>- Parent
6ac8049
6 files changed+10 added−9 removed
modified:serde/src/de/mod.rs+4 added-4 removed
204 unmodified lines205 /// For example if we try to deserialize a String out of a JSON file206 /// containing an integer, the unexpected type is the integer and the207 /// expected type is the string.208 #[cold]209- fn invalid_type(unexp: Unexpected, exp: &Expected) -> Self {209+ fn invalid_type(unexp: Unexpected, exp: &dyn Expected) -> Self {210 Error::custom(format_args!("invalid type: {}, expected {}", unexp, exp))211 }212 213 /// Raised when a `Deserialize` receives a value of the right type but that9 unmodified lines223 /// For example if we try to deserialize a String out of some binary data224 /// that is not valid UTF-8, the unexpected value is the bytes and the225 /// expected value is a string.226 #[cold]227- fn invalid_value(unexp: Unexpected, exp: &Expected) -> Self {227+ fn invalid_value(unexp: Unexpected, exp: &dyn Expected) -> Self {228 Error::custom(format_args!("invalid value: {}, expected {}", unexp, exp))229 }230 231 /// Raised when deserializing a sequence or map and the input data contains5 unmodified lines237 /// The `exp` argument provides information about what data was being238 /// expected. For example `exp` might say that a tuple of size 6 was239 /// expected.240 #[cold]241- fn invalid_length(len: usize, exp: &Expected) -> Self {241+ fn invalid_length(len: usize, exp: &dyn Expected) -> Self {242 Error::custom(format_args!("invalid length {}, expected {}", len, exp))243 }244 245 /// Raised when a `Deserialize` enum type received a variant with an245 unmodified lines491 formatter.write_str(self)492 }493 }494 495-impl Display for Expected + '_ {495+impl Display for dyn Expected + '_ {496 fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {497 Expected::fmt(self, formatter)498 }499 }1836 unmodified linesmodified:serde/src/private/de.rs+2 added-2 removed
1063 unmodified lines1064 where1065 E: de::Error,1066 {1067 #[cold]1068- fn invalid_type(self, exp: &Expected) -> E {1068+ fn invalid_type(self, exp: &dyn Expected) -> E {1069 de::Error::invalid_type(self.content.unexpected(), exp)1070 }1071 1072 fn deserialize_integer<V>(self, visitor: V) -> Result<V::Value, E>580 unmodified lines1653 where1654 E: de::Error,1655 {1656 #[cold]1657- fn invalid_type(self, exp: &Expected) -> E {1657+ fn invalid_type(self, exp: &dyn Expected) -> E {1658 de::Error::invalid_type(self.content.unexpected(), exp)1659 }1660 1661 fn deserialize_integer<V>(self, visitor: V) -> Result<V::Value, E>1143 unmodified linesmodified:serde/Cargo.toml+1 added-1 removed
4 unmodified lines5678991011121358 unmodified lines4 unmodified linesbuild = "build.rs"categories = ["encoding", "no-std", "no-std::no-alloc"]description = "A generic serialization/deserialization framework"documentation = "https://docs.rs/serde"edition = "2018"edition = "2021"homepage = "https://serde.rs"keywords = ["serde", "serialization", "no_std"]license = "MIT OR Apache-2.0"readme = "crates-io.md"58 unmodified linesmodified:serde_derive/Cargo.toml+1 added-1 removed
3 unmodified lines456788910111229 unmodified lines3 unmodified linesauthors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]categories = ["no-std", "no-std::no-alloc"]description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"documentation = "https://serde.rs/derive.html"edition = "2015"edition = "2021"exclude = ["build.rs"]homepage = "https://serde.rs"keywords = ["serde", "serialization", "no_std", "derive"]license = "MIT OR Apache-2.0"29 unmodified linesmodified:serde_derive_internals/Cargo.toml+1 added-1 removed
2 unmodified lines34567789101120 unmodified lines2 unmodified linesversion = "0.29.1"authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]description = "AST representation used by Serde derive macros. Unstable."documentation = "https://docs.rs/serde_derive_internals"edition = "2015"edition = "2021"exclude = ["build.rs"]homepage = "https://serde.rs"keywords = ["serde", "serialization"]license = "MIT OR Apache-2.0"20 unmodified linesmodified:Cargo.toml+1 added
3 unmodified lines4567891011124 unmodified lines3 unmodified lines "serde_derive", "serde_derive_internals", "test_suite",]resolver = "2"
[patch.crates-io]serde = { path = "serde" }
4 unmodified lines