mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 05:37:58 +00:00
Switch all crates to edition 2021
This commit is contained in:
@@ -5,6 +5,7 @@ members = [
|
||||
"serde_derive_internals",
|
||||
"test_suite",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[patch.crates-io]
|
||||
serde = { path = "serde" }
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ build = "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"
|
||||
|
||||
+4
-4
@@ -206,7 +206,7 @@ macro_rules! declare_error_trait {
|
||||
/// containing an integer, the unexpected type is the integer and the
|
||||
/// expected type is the string.
|
||||
#[cold]
|
||||
fn invalid_type(unexp: Unexpected, exp: &Expected) -> Self {
|
||||
fn invalid_type(unexp: Unexpected, exp: &dyn Expected) -> Self {
|
||||
Error::custom(format_args!("invalid type: {}, expected {}", unexp, exp))
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ macro_rules! declare_error_trait {
|
||||
/// that is not valid UTF-8, the unexpected value is the bytes and the
|
||||
/// expected value is a string.
|
||||
#[cold]
|
||||
fn invalid_value(unexp: Unexpected, exp: &Expected) -> Self {
|
||||
fn invalid_value(unexp: Unexpected, exp: &dyn Expected) -> Self {
|
||||
Error::custom(format_args!("invalid value: {}, expected {}", unexp, exp))
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ macro_rules! declare_error_trait {
|
||||
/// expected. For example `exp` might say that a tuple of size 6 was
|
||||
/// expected.
|
||||
#[cold]
|
||||
fn invalid_length(len: usize, exp: &Expected) -> Self {
|
||||
fn invalid_length(len: usize, exp: &dyn Expected) -> Self {
|
||||
Error::custom(format_args!("invalid length {}, expected {}", len, exp))
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ impl Expected for &str {
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Expected + '_ {
|
||||
impl Display for dyn Expected + '_ {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
Expected::fmt(self, formatter)
|
||||
}
|
||||
|
||||
@@ -1065,7 +1065,7 @@ mod content {
|
||||
E: de::Error,
|
||||
{
|
||||
#[cold]
|
||||
fn invalid_type(self, exp: &Expected) -> E {
|
||||
fn invalid_type(self, exp: &dyn Expected) -> E {
|
||||
de::Error::invalid_type(self.content.unexpected(), exp)
|
||||
}
|
||||
|
||||
@@ -1654,7 +1654,7 @@ mod content {
|
||||
E: de::Error,
|
||||
{
|
||||
#[cold]
|
||||
fn invalid_type(self, exp: &Expected) -> E {
|
||||
fn invalid_type(self, exp: &dyn Expected) -> E {
|
||||
de::Error::invalid_type(self.content.unexpected(), exp)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay
|
||||
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"]
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "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"]
|
||||
|
||||
Reference in New Issue
Block a user