From 88ebc0f9d561a2541aad84a3152511a0439db8b4 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 16 Aug 2019 17:56:19 +0200 Subject: Reduce api surface of dhall crate Helps detect unused code --- serde_dhall/src/lib.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'serde_dhall/src') 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)] -- cgit v1.2.3