summaryrefslogtreecommitdiff
path: root/serde_dhall/src/value.rs
diff options
context:
space:
mode:
authorNadrieril2020-04-05 11:43:22 +0100
committerNadrieril2020-04-05 11:43:22 +0100
commit15a0902b50ff6d1b36dbf7a220b6ff42ceefada6 (patch)
treebf9239a9d222499f2e0c6d2781651a006d6511ce /serde_dhall/src/value.rs
parent158117e4096f5af571e79e1a33d91f09e7b2cc5d (diff)
Rename Deserialize trait to FromDhall
Diffstat (limited to 'serde_dhall/src/value.rs')
-rw-r--r--serde_dhall/src/value.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/serde_dhall/src/value.rs b/serde_dhall/src/value.rs
index 3543f4d..fee9d73 100644
--- a/serde_dhall/src/value.rs
+++ b/serde_dhall/src/value.rs
@@ -3,7 +3,7 @@ use std::collections::{BTreeMap, HashMap};
use dhall::semantics::{Hir, HirKind, Nir, NirKind};
use dhall::syntax::{Builtin, Expr, ExprKind, NumKind, Span};
-use crate::{Deserialize, Error, ErrorKind, Result, Sealed};
+use crate::{FromDhall, Error, ErrorKind, Result, Sealed};
#[doc(hidden)]
/// An arbitrary Dhall value.
@@ -246,12 +246,12 @@ impl Sealed for Value {}
impl Sealed for SimpleValue {}
impl Sealed for SimpleType {}
-impl Deserialize for Value {
+impl FromDhall for Value {
fn from_dhall(v: &Value) -> Result<Self> {
Ok(v.clone())
}
}
-impl Deserialize for SimpleValue {
+impl FromDhall for SimpleValue {
fn from_dhall(v: &Value) -> Result<Self> {
v.to_simple_value().ok_or_else(|| {
Error(ErrorKind::Deserialize(format!(
@@ -261,7 +261,7 @@ impl Deserialize for SimpleValue {
})
}
}
-impl Deserialize for SimpleType {
+impl FromDhall for SimpleType {
fn from_dhall(v: &Value) -> Result<Self> {
v.to_simple_type().ok_or_else(|| {
Error(ErrorKind::Deserialize(format!(