summaryrefslogtreecommitdiff
path: root/serde_dhall
diff options
context:
space:
mode:
authorNadrieril2019-08-16 17:56:19 +0200
committerNadrieril2019-08-16 18:01:46 +0200
commit88ebc0f9d561a2541aad84a3152511a0439db8b4 (patch)
tree73571d5509f8631da63c09ec78acd30862f237f9 /serde_dhall
parente8bf879471708ac2cc03df904d14a618daaf2132 (diff)
Reduce api surface of dhall crate
Helps detect unused code
Diffstat (limited to 'serde_dhall')
-rw-r--r--serde_dhall/src/lib.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/serde_dhall/src/lib.rs b/serde_dhall/src/lib.rs
index 14d8b47..71674a9 100644
--- a/serde_dhall/src/lib.rs
+++ b/serde_dhall/src/lib.rs
@@ -167,16 +167,14 @@ pub mod value {
Self::from_dhall_value(DhallValue::from_builtin(b))
}
pub(crate) fn make_optional_type(t: Value) -> Self {
- Self::from_dhall_value(DhallValue::AppliedBuiltin(
- Builtin::Optional,
- vec![t.to_thunk()],
- ))
+ Self::from_dhall_value(
+ DhallValue::from_builtin(Builtin::Optional).app_thunk(t.to_thunk()),
+ )
}
pub(crate) fn make_list_type(t: Value) -> Self {
- Self::from_dhall_value(DhallValue::AppliedBuiltin(
- Builtin::List,
- vec![t.to_thunk()],
- ))
+ Self::from_dhall_value(
+ DhallValue::from_builtin(Builtin::List).app_thunk(t.to_thunk()),
+ )
}
// Made public for the StaticType derive macro
#[doc(hidden)]