mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-29 14:07:55 +00:00
Switch all crates to edition 2021
This commit is contained in:
+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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user