From da9937f623f2698adec50718e1e703958e837c85 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 7 Apr 2019 01:08:02 +0200 Subject: Put a Cow in Type --- dhall/src/expr.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dhall/src/expr.rs') diff --git a/dhall/src/expr.rs b/dhall/src/expr.rs index ad35645..75d7690 100644 --- a/dhall/src/expr.rs +++ b/dhall/src/expr.rs @@ -8,10 +8,10 @@ pub struct Parsed(pub(crate) SubExpr, pub(crate) ImportRoot); pub struct Resolved(pub(crate) SubExpr); #[derive(Debug, Clone)] -pub struct Typed(pub(crate) SubExpr, pub(crate) Type); +pub struct Typed(pub(crate) SubExpr, pub(crate) Type<'static>); #[derive(Debug, Clone)] -pub struct Type(pub(crate) TypeInternal); +pub struct Type<'a>(pub(crate) std::borrow::Cow<'a, TypeInternal>); #[derive(Debug, Clone)] pub(crate) enum TypeInternal { @@ -20,7 +20,7 @@ pub(crate) enum TypeInternal { } #[derive(Debug, Clone)] -pub struct Normalized(pub(crate) SubExpr, pub(crate) Type); +pub struct Normalized(pub(crate) SubExpr, pub(crate) Type<'static>); impl PartialEq for Parsed { fn eq(&self, other: &Self) -> bool { -- cgit v1.2.3