From 77258af83dfe93293ad854ccb401d1ce7453edfc Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 27 Oct 2020 23:33:26 +0000 Subject: Make `SimpleValue` deserializable within other types Fixes https://github.com/Nadrieril/dhall-rust/issues/184 --- serde_dhall/src/value.rs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'serde_dhall/src/value.rs') diff --git a/serde_dhall/src/value.rs b/serde_dhall/src/value.rs index 79ba75a..d7116d9 100644 --- a/serde_dhall/src/value.rs +++ b/serde_dhall/src/value.rs @@ -377,7 +377,6 @@ impl SimpleType { } impl Sealed for Value {} -impl Sealed for SimpleValue {} impl Sealed for SimpleType {} impl FromDhall for Value { @@ -385,16 +384,6 @@ impl FromDhall for Value { Ok(v.clone()) } } -impl FromDhall for SimpleValue { - fn from_dhall(v: &Value) -> Result { - v.to_simple_value().ok_or_else(|| { - Error(ErrorKind::Deserialize(format!( - "this cannot be deserialized into a simple type: {}", - v - ))) - }) - } -} impl FromDhall for SimpleType { fn from_dhall(v: &Value) -> Result { v.to_simple_type().ok_or_else(|| { -- cgit v1.2.3