Merge pull request #2436 from Mingun/flatten-ignored-any

Allow to flatten `IgnoredAny`
This commit is contained in:
David Tolnay
2023-07-06 16:35:10 -07:00
committed by GitHub
3 changed files with 34 additions and 3 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ use de::{
/// # Ok(())
/// # }
/// ```
#[derive(Copy, Clone, Debug, Default)]
#[derive(Copy, Clone, Debug, Default, PartialEq)]
pub struct IgnoredAny;
impl<'de> Visitor<'de> for IgnoredAny {
+7 -1
View File
@@ -2794,6 +2794,13 @@ where
visitor.visit_unit()
}
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: Visitor<'de>,
{
visitor.visit_unit()
}
forward_to_deserialize_other! {
deserialize_bool()
deserialize_i8()
@@ -2816,7 +2823,6 @@ where
deserialize_tuple(usize)
deserialize_tuple_struct(&'static str, usize)
deserialize_identifier()
deserialize_ignored_any()
}
}