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 --- dhall/src/core/var.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dhall/src/core/var.rs') diff --git a/dhall/src/core/var.rs b/dhall/src/core/var.rs index d53c194..4ef1b93 100644 --- a/dhall/src/core/var.rs +++ b/dhall/src/core/var.rs @@ -16,7 +16,7 @@ pub struct AlphaVar { #[derive(Clone, Eq)] pub struct AlphaLabel(Label); -pub trait Shift: Sized { +pub(crate) trait Shift: Sized { // Shift an expression to move it around binders without changing the meaning of its free // variables. Shift by 1 to move an expression under a binder. Shift by -1 to extract an // expression from under a binder, if the expression does not refer to that bound variable. @@ -50,24 +50,24 @@ pub trait Shift: Sized { } } -pub trait Subst { +pub(crate) trait Subst { fn subst_shift(&self, var: &AlphaVar, val: &T) -> Self; } impl AlphaVar { - pub fn to_var(&self, alpha: bool) -> V