mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 11:21:01 +00:00
Format with rustfmt 2020-03-11
This commit is contained in:
@@ -90,10 +90,13 @@ macro_rules! visit_integer_method {
|
|||||||
{
|
{
|
||||||
match FromPrimitive::$from_method(v) {
|
match FromPrimitive::$from_method(v) {
|
||||||
Some(v) => Ok(v),
|
Some(v) => Ok(v),
|
||||||
None => Err(Error::invalid_value(Unexpected::$group(v as $group_ty), &self)),
|
None => Err(Error::invalid_value(
|
||||||
|
Unexpected::$group(v as $group_ty),
|
||||||
|
&self,
|
||||||
|
)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! visit_float_method {
|
macro_rules! visit_float_method {
|
||||||
@@ -105,7 +108,7 @@ macro_rules! visit_float_method {
|
|||||||
{
|
{
|
||||||
Ok(v as Self::Value)
|
Ok(v as Self::Value)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! impl_deserialize_num {
|
macro_rules! impl_deserialize_num {
|
||||||
|
|||||||
@@ -183,7 +183,9 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deserializer.deserialize_bytes(CowBytesVisitor).map(From::from)
|
deserializer
|
||||||
|
.deserialize_bytes(CowBytesVisitor)
|
||||||
|
.map(From::from)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod size_hint {
|
pub mod size_hint {
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ fn test_gen() {
|
|||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "unstable")]
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
struct NonAsciiIdents {
|
struct NonAsciiIdents {
|
||||||
σ: f64,
|
σ: f64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
|
|||||||
Reference in New Issue
Block a user