mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
Update and do not use serve private export (#3585)
* Update serde, serde_derive, syn, failure and failure_derive * Do not use serde private export
This commit is contained in:
parent
059e6ad545
commit
e023739658
2 changed files with 171 additions and 180 deletions
44
Cargo.lock
generated
44
Cargo.lock
generated
|
@ -453,7 +453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "39858aa5bac06462d4dd4b9164848eb81ffc4aa5c479746393598fd193afa227"
|
||||
dependencies = [
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -503,7 +503,7 @@ dependencies = [
|
|||
"log",
|
||||
"num 0.3.1",
|
||||
"owning_ref",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
"unicode-segmentation",
|
||||
"unicode-width",
|
||||
"wasmer_enumset",
|
||||
|
@ -540,7 +540,7 @@ dependencies = [
|
|||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"strsim 0.9.3",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -551,7 +551,7 @@ checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72"
|
|||
dependencies = [
|
||||
"darling_core",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -639,7 +639,7 @@ checksum = "e57001dfb2532f5a103ff869656887fae9a8defa7d236f3e39d2ee86ed629ad7"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -682,7 +682,7 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
"synstructure 0.12.4",
|
||||
]
|
||||
|
||||
|
@ -817,7 +817,7 @@ dependencies = [
|
|||
"proc-macro-hack",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1998,7 +1998,7 @@ checksum = "10b4b44893d3c370407a1d6a5cfde7c41ae0478e31c516c85f67eb3adc51be6d"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2009,7 +2009,7 @@ checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2496,9 +2496,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
|||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.111"
|
||||
version = "1.0.123"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9124df5b40cbd380080b2cc6ab894c040a3070d995f5c9dc77e18c34a8ae37d"
|
||||
checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
@ -2515,13 +2515,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.111"
|
||||
version = "1.0.123"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f2c3ac8e6ca1e9c80b8be1023940162bf81ae3cffbb1809474152f2ce1eb250"
|
||||
checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2657,9 +2657,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.54"
|
||||
version = "1.0.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44"
|
||||
checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
|
||||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
|
@ -2686,7 +2686,7 @@ checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
"unicode-xid 0.2.0",
|
||||
]
|
||||
|
||||
|
@ -2814,7 +2814,7 @@ checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3072,7 +3072,7 @@ dependencies = [
|
|||
"log",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
|
@ -3094,7 +3094,7 @@ checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
@ -3124,7 +3124,7 @@ dependencies = [
|
|||
"darling",
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3277,7 +3277,7 @@ checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2"
|
|||
dependencies = [
|
||||
"proc-macro2 1.0.24",
|
||||
"quote 1.0.7",
|
||||
"syn 1.0.54",
|
||||
"syn 1.0.60",
|
||||
"synstructure 0.12.4",
|
||||
]
|
||||
|
||||
|
|
307
core/src/ser.rs
307
core/src/ser.rs
|
@ -27,7 +27,7 @@ use keychain::{BlindingFactor, Identifier, IDENTIFIER_SIZE};
|
|||
use std::convert::TryInto;
|
||||
use std::fmt::{self, Debug};
|
||||
use std::io::{self, Read, Write};
|
||||
use std::{cmp, error, marker};
|
||||
use std::{cmp, error, marker, string};
|
||||
use util::secp::constants::{
|
||||
AGG_SIGNATURE_SIZE, COMPRESSED_PUBLIC_KEY_SIZE, MAX_PROOF_SIZE, PEDERSEN_COMMITMENT_SIZE,
|
||||
SECRET_KEY_SIZE,
|
||||
|
@ -985,10 +985,7 @@ impl<T: DefaultHashable> PMMRIndexHashable for T {
|
|||
|
||||
// serializer for io::Errorkind, originally auto-generated by serde-derive
|
||||
// slightly modified to handle the #[non_exhaustive] tag on io::ErrorKind
|
||||
fn serialize_error_kind<S>(
|
||||
kind: &io::ErrorKind,
|
||||
serializer: S,
|
||||
) -> serde::export::Result<S::Ok, S::Error>
|
||||
fn serialize_error_kind<S>(kind: &io::ErrorKind, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: serde::Serializer,
|
||||
{
|
||||
|
@ -1080,7 +1077,7 @@ where
|
|||
}
|
||||
|
||||
// deserializer for io::Errorkind, originally auto-generated by serde-derive
|
||||
fn deserialize_error_kind<'de, D>(deserializer: D) -> serde::export::Result<io::ErrorKind, D::Error>
|
||||
fn deserialize_error_kind<'de, D>(deserializer: D) -> Result<io::ErrorKind, D::Error>
|
||||
where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
|
@ -1108,100 +1105,97 @@ where
|
|||
struct FieldVisitor;
|
||||
impl<'de> serde::de::Visitor<'de> for FieldVisitor {
|
||||
type Value = Field;
|
||||
fn expecting(
|
||||
&self,
|
||||
formatter: &mut serde::export::Formatter,
|
||||
) -> serde::export::fmt::Result {
|
||||
serde::export::Formatter::write_str(formatter, "variant identifier")
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Formatter::write_str(formatter, "variant identifier")
|
||||
}
|
||||
fn visit_u64<E>(self, value: u64) -> serde::export::Result<Self::Value, E>
|
||||
fn visit_u64<E>(self, value: u64) -> Result<Self::Value, E>
|
||||
where
|
||||
E: serde::de::Error,
|
||||
{
|
||||
match value {
|
||||
0u64 => serde::export::Ok(Field::field0),
|
||||
1u64 => serde::export::Ok(Field::field1),
|
||||
2u64 => serde::export::Ok(Field::field2),
|
||||
3u64 => serde::export::Ok(Field::field3),
|
||||
4u64 => serde::export::Ok(Field::field4),
|
||||
5u64 => serde::export::Ok(Field::field5),
|
||||
6u64 => serde::export::Ok(Field::field6),
|
||||
7u64 => serde::export::Ok(Field::field7),
|
||||
8u64 => serde::export::Ok(Field::field8),
|
||||
9u64 => serde::export::Ok(Field::field9),
|
||||
10u64 => serde::export::Ok(Field::field10),
|
||||
11u64 => serde::export::Ok(Field::field11),
|
||||
12u64 => serde::export::Ok(Field::field12),
|
||||
13u64 => serde::export::Ok(Field::field13),
|
||||
14u64 => serde::export::Ok(Field::field14),
|
||||
15u64 => serde::export::Ok(Field::field15),
|
||||
16u64 => serde::export::Ok(Field::field16),
|
||||
17u64 => serde::export::Ok(Field::field17),
|
||||
_ => serde::export::Err(serde::de::Error::invalid_value(
|
||||
0u64 => Ok(Field::field0),
|
||||
1u64 => Ok(Field::field1),
|
||||
2u64 => Ok(Field::field2),
|
||||
3u64 => Ok(Field::field3),
|
||||
4u64 => Ok(Field::field4),
|
||||
5u64 => Ok(Field::field5),
|
||||
6u64 => Ok(Field::field6),
|
||||
7u64 => Ok(Field::field7),
|
||||
8u64 => Ok(Field::field8),
|
||||
9u64 => Ok(Field::field9),
|
||||
10u64 => Ok(Field::field10),
|
||||
11u64 => Ok(Field::field11),
|
||||
12u64 => Ok(Field::field12),
|
||||
13u64 => Ok(Field::field13),
|
||||
14u64 => Ok(Field::field14),
|
||||
15u64 => Ok(Field::field15),
|
||||
16u64 => Ok(Field::field16),
|
||||
17u64 => Ok(Field::field17),
|
||||
_ => Err(serde::de::Error::invalid_value(
|
||||
serde::de::Unexpected::Unsigned(value),
|
||||
&"variant index 0 <= i < 18",
|
||||
)),
|
||||
}
|
||||
}
|
||||
fn visit_str<E>(self, value: &str) -> serde::export::Result<Self::Value, E>
|
||||
fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>
|
||||
where
|
||||
E: serde::de::Error,
|
||||
{
|
||||
match value {
|
||||
"NotFound" => serde::export::Ok(Field::field0),
|
||||
"PermissionDenied" => serde::export::Ok(Field::field1),
|
||||
"ConnectionRefused" => serde::export::Ok(Field::field2),
|
||||
"ConnectionReset" => serde::export::Ok(Field::field3),
|
||||
"ConnectionAborted" => serde::export::Ok(Field::field4),
|
||||
"NotConnected" => serde::export::Ok(Field::field5),
|
||||
"AddrInUse" => serde::export::Ok(Field::field6),
|
||||
"AddrNotAvailable" => serde::export::Ok(Field::field7),
|
||||
"BrokenPipe" => serde::export::Ok(Field::field8),
|
||||
"AlreadyExists" => serde::export::Ok(Field::field9),
|
||||
"WouldBlock" => serde::export::Ok(Field::field10),
|
||||
"InvalidInput" => serde::export::Ok(Field::field11),
|
||||
"InvalidData" => serde::export::Ok(Field::field12),
|
||||
"TimedOut" => serde::export::Ok(Field::field13),
|
||||
"WriteZero" => serde::export::Ok(Field::field14),
|
||||
"Interrupted" => serde::export::Ok(Field::field15),
|
||||
"Other" => serde::export::Ok(Field::field16),
|
||||
"UnexpectedEof" => serde::export::Ok(Field::field17),
|
||||
_ => serde::export::Err(serde::de::Error::unknown_variant(value, VARIANTS)),
|
||||
"NotFound" => Ok(Field::field0),
|
||||
"PermissionDenied" => Ok(Field::field1),
|
||||
"ConnectionRefused" => Ok(Field::field2),
|
||||
"ConnectionReset" => Ok(Field::field3),
|
||||
"ConnectionAborted" => Ok(Field::field4),
|
||||
"NotConnected" => Ok(Field::field5),
|
||||
"AddrInUse" => Ok(Field::field6),
|
||||
"AddrNotAvailable" => Ok(Field::field7),
|
||||
"BrokenPipe" => Ok(Field::field8),
|
||||
"AlreadyExists" => Ok(Field::field9),
|
||||
"WouldBlock" => Ok(Field::field10),
|
||||
"InvalidInput" => Ok(Field::field11),
|
||||
"InvalidData" => Ok(Field::field12),
|
||||
"TimedOut" => Ok(Field::field13),
|
||||
"WriteZero" => Ok(Field::field14),
|
||||
"Interrupted" => Ok(Field::field15),
|
||||
"Other" => Ok(Field::field16),
|
||||
"UnexpectedEof" => Ok(Field::field17),
|
||||
_ => Err(serde::de::Error::unknown_variant(value, VARIANTS)),
|
||||
}
|
||||
}
|
||||
fn visit_bytes<E>(self, value: &[u8]) -> serde::export::Result<Self::Value, E>
|
||||
fn visit_bytes<E>(self, value: &[u8]) -> Result<Self::Value, E>
|
||||
where
|
||||
E: serde::de::Error,
|
||||
{
|
||||
match value {
|
||||
b"NotFound" => serde::export::Ok(Field::field0),
|
||||
b"PermissionDenied" => serde::export::Ok(Field::field1),
|
||||
b"ConnectionRefused" => serde::export::Ok(Field::field2),
|
||||
b"ConnectionReset" => serde::export::Ok(Field::field3),
|
||||
b"ConnectionAborted" => serde::export::Ok(Field::field4),
|
||||
b"NotConnected" => serde::export::Ok(Field::field5),
|
||||
b"AddrInUse" => serde::export::Ok(Field::field6),
|
||||
b"AddrNotAvailable" => serde::export::Ok(Field::field7),
|
||||
b"BrokenPipe" => serde::export::Ok(Field::field8),
|
||||
b"AlreadyExists" => serde::export::Ok(Field::field9),
|
||||
b"WouldBlock" => serde::export::Ok(Field::field10),
|
||||
b"InvalidInput" => serde::export::Ok(Field::field11),
|
||||
b"InvalidData" => serde::export::Ok(Field::field12),
|
||||
b"TimedOut" => serde::export::Ok(Field::field13),
|
||||
b"WriteZero" => serde::export::Ok(Field::field14),
|
||||
b"Interrupted" => serde::export::Ok(Field::field15),
|
||||
b"Other" => serde::export::Ok(Field::field16),
|
||||
b"UnexpectedEof" => serde::export::Ok(Field::field17),
|
||||
b"NotFound" => Ok(Field::field0),
|
||||
b"PermissionDenied" => Ok(Field::field1),
|
||||
b"ConnectionRefused" => Ok(Field::field2),
|
||||
b"ConnectionReset" => Ok(Field::field3),
|
||||
b"ConnectionAborted" => Ok(Field::field4),
|
||||
b"NotConnected" => Ok(Field::field5),
|
||||
b"AddrInUse" => Ok(Field::field6),
|
||||
b"AddrNotAvailable" => Ok(Field::field7),
|
||||
b"BrokenPipe" => Ok(Field::field8),
|
||||
b"AlreadyExists" => Ok(Field::field9),
|
||||
b"WouldBlock" => Ok(Field::field10),
|
||||
b"InvalidInput" => Ok(Field::field11),
|
||||
b"InvalidData" => Ok(Field::field12),
|
||||
b"TimedOut" => Ok(Field::field13),
|
||||
b"WriteZero" => Ok(Field::field14),
|
||||
b"Interrupted" => Ok(Field::field15),
|
||||
b"Other" => Ok(Field::field16),
|
||||
b"UnexpectedEof" => Ok(Field::field17),
|
||||
_ => {
|
||||
let value = &serde::export::from_utf8_lossy(value);
|
||||
serde::export::Err(serde::de::Error::unknown_variant(value, VARIANTS))
|
||||
let value = &string::String::from_utf8_lossy(value);
|
||||
Err(serde::de::Error::unknown_variant(value, VARIANTS))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
impl<'de> serde::Deserialize<'de> for Field {
|
||||
#[inline]
|
||||
fn deserialize<D>(deserializer: D) -> serde::export::Result<Self, D::Error>
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
|
@ -1209,188 +1203,185 @@ where
|
|||
}
|
||||
}
|
||||
struct Visitor<'de> {
|
||||
marker: serde::export::PhantomData<io::ErrorKind>,
|
||||
lifetime: serde::export::PhantomData<&'de ()>,
|
||||
marker: marker::PhantomData<io::ErrorKind>,
|
||||
lifetime: marker::PhantomData<&'de ()>,
|
||||
}
|
||||
impl<'de> serde::de::Visitor<'de> for Visitor<'de> {
|
||||
type Value = io::ErrorKind;
|
||||
fn expecting(
|
||||
&self,
|
||||
formatter: &mut serde::export::Formatter,
|
||||
) -> serde::export::fmt::Result {
|
||||
serde::export::Formatter::write_str(formatter, "enum io::ErrorKind")
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Formatter::write_str(formatter, "enum io::ErrorKind")
|
||||
}
|
||||
fn visit_enum<A>(self, data: A) -> serde::export::Result<Self::Value, A::Error>
|
||||
fn visit_enum<A>(self, data: A) -> Result<Self::Value, A::Error>
|
||||
where
|
||||
A: serde::de::EnumAccess<'de>,
|
||||
{
|
||||
match match serde::de::EnumAccess::variant(data) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
} {
|
||||
(Field::field0, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::NotFound)
|
||||
Ok(io::ErrorKind::NotFound)
|
||||
}
|
||||
(Field::field1, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::PermissionDenied)
|
||||
Ok(io::ErrorKind::PermissionDenied)
|
||||
}
|
||||
(Field::field2, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::ConnectionRefused)
|
||||
Ok(io::ErrorKind::ConnectionRefused)
|
||||
}
|
||||
(Field::field3, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::ConnectionReset)
|
||||
Ok(io::ErrorKind::ConnectionReset)
|
||||
}
|
||||
(Field::field4, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::ConnectionAborted)
|
||||
Ok(io::ErrorKind::ConnectionAborted)
|
||||
}
|
||||
(Field::field5, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::NotConnected)
|
||||
Ok(io::ErrorKind::NotConnected)
|
||||
}
|
||||
(Field::field6, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::AddrInUse)
|
||||
Ok(io::ErrorKind::AddrInUse)
|
||||
}
|
||||
(Field::field7, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::AddrNotAvailable)
|
||||
Ok(io::ErrorKind::AddrNotAvailable)
|
||||
}
|
||||
(Field::field8, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::BrokenPipe)
|
||||
Ok(io::ErrorKind::BrokenPipe)
|
||||
}
|
||||
(Field::field9, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::AlreadyExists)
|
||||
Ok(io::ErrorKind::AlreadyExists)
|
||||
}
|
||||
(Field::field10, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::WouldBlock)
|
||||
Ok(io::ErrorKind::WouldBlock)
|
||||
}
|
||||
(Field::field11, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::InvalidInput)
|
||||
Ok(io::ErrorKind::InvalidInput)
|
||||
}
|
||||
(Field::field12, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::InvalidData)
|
||||
Ok(io::ErrorKind::InvalidData)
|
||||
}
|
||||
(Field::field13, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::TimedOut)
|
||||
Ok(io::ErrorKind::TimedOut)
|
||||
}
|
||||
(Field::field14, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::WriteZero)
|
||||
Ok(io::ErrorKind::WriteZero)
|
||||
}
|
||||
(Field::field15, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::Interrupted)
|
||||
Ok(io::ErrorKind::Interrupted)
|
||||
}
|
||||
(Field::field16, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::Other)
|
||||
Ok(io::ErrorKind::Other)
|
||||
}
|
||||
(Field::field17, variant) => {
|
||||
match serde::de::VariantAccess::unit_variant(variant) {
|
||||
serde::export::Ok(val) => val,
|
||||
serde::export::Err(err) => {
|
||||
return serde::export::Err(err);
|
||||
Ok(val) => val,
|
||||
Err(err) => {
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
serde::export::Ok(io::ErrorKind::UnexpectedEof)
|
||||
Ok(io::ErrorKind::UnexpectedEof)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1420,8 +1411,8 @@ where
|
|||
"ErrorKind",
|
||||
VARIANTS,
|
||||
Visitor {
|
||||
marker: serde::export::PhantomData::<io::ErrorKind>,
|
||||
lifetime: serde::export::PhantomData,
|
||||
marker: marker::PhantomData::<io::ErrorKind>,
|
||||
lifetime: marker::PhantomData,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue