Skip to content

Commit

Permalink
Merge pull request #1955 from TheJokr/patch-1
Browse files Browse the repository at this point in the history
Add 128-bit integer support to de::IgnoredAny
  • Loading branch information
dtolnay committed Jan 19, 2021
2 parents 78a9dbc + c162d51 commit cd6697b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions serde/src/de/ignored_any.rs
Expand Up @@ -130,12 +130,28 @@ impl<'de> Visitor<'de> for IgnoredAny {
Ok(IgnoredAny)
}

serde_if_integer128! {
#[inline]
fn visit_i128<E>(self, x: i128) -> Result<Self::Value, E> {
let _ = x;
Ok(IgnoredAny)
}
}

#[inline]
fn visit_u64<E>(self, x: u64) -> Result<Self::Value, E> {
let _ = x;
Ok(IgnoredAny)
}

serde_if_integer128! {
#[inline]
fn visit_u128<E>(self, x: u128) -> Result<Self::Value, E> {
let _ = x;
Ok(IgnoredAny)
}
}

#[inline]
fn visit_f64<E>(self, x: f64) -> Result<Self::Value, E> {
let _ = x;
Expand Down

0 comments on commit cd6697b

Please sign in to comment.