diff options
author | Nadrieril | 2020-02-19 17:24:41 +0000 |
---|---|---|
committer | Nadrieril | 2020-02-19 17:24:41 +0000 |
commit | 26ed5a1d4d43573ac8ad2f8de9e4dd411650aa9a (patch) | |
tree | 39c7a0dbc2ae2c0448591f2d91f612d324ae6393 /serde_dhall | |
parent | ce4665bdfcbcb4e34e760acef83bd4de3fbef530 (diff) |
Expose fewer pub things
Diffstat (limited to 'serde_dhall')
-rw-r--r-- | serde_dhall/src/serde.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/serde_dhall/src/serde.rs b/serde_dhall/src/serde.rs index 160392d..4fd7815 100644 --- a/serde_dhall/src/serde.rs +++ b/serde_dhall/src/serde.rs @@ -48,7 +48,7 @@ impl<'de: 'a, 'a> serde::Deserializer<'de> for Deserializer<'a> { ))) }; - match expr.as_ref() { + match expr.kind() { Lit(Bool(x)) => visitor.visit_bool(*x), Lit(Natural(x)) => { if let Ok(x64) = (*x).try_into() { @@ -81,11 +81,11 @@ impl<'de: 'a, 'a> serde::Deserializer<'de> for Deserializer<'a> { xs.iter().map(|x| Deserializer(Cow::Borrowed(x))), )), SomeLit(x) => visitor.visit_some(Deserializer(Cow::Borrowed(x))), - App(f, x) => match f.as_ref() { + App(f, x) => match f.kind() { Builtin(dhall::syntax::Builtin::OptionalNone) => { visitor.visit_none() } - Field(y, name) => match y.as_ref() { + Field(y, name) => match y.kind() { UnionType(..) => { let name: String = name.into(); visitor.visit_enum(MapAccessDeserializer::new( @@ -103,7 +103,7 @@ impl<'de: 'a, 'a> serde::Deserializer<'de> for Deserializer<'a> { .visit_map(MapDeserializer::new(m.iter().map(|(k, v)| { (k.as_ref(), Deserializer(Cow::Borrowed(v))) }))), - Field(y, name) => match y.as_ref() { + Field(y, name) => match y.kind() { UnionType(..) => { let name: String = name.into(); visitor.visit_enum(MapAccessDeserializer::new( @@ -127,7 +127,7 @@ impl<'de: 'a, 'a> serde::Deserializer<'de> for Deserializer<'a> { use ExprKind::*; let expr = self.0.as_ref(); - match expr.as_ref() { + match expr.kind() { // Blindly takes keys in sorted order. RecordLit(m) => visitor.visit_seq(SeqDeserializer::new( m.iter().map(|(_, v)| Deserializer(Cow::Borrowed(v))), |