From c157df5e66fb80ff6184cb3934e5b0883f0fdbf0 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 20 Aug 2019 18:11:05 +0200 Subject: No need for Cow in return type of get_type --- dhall/src/core/value.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dhall/src/core') diff --git a/dhall/src/core/value.rs b/dhall/src/core/value.rs index 25fcaae..64a4842 100644 --- a/dhall/src/core/value.rs +++ b/dhall/src/core/value.rs @@ -1,4 +1,3 @@ -use std::borrow::Cow; use std::cell::{Ref, RefCell, RefMut}; use std::rc::Rc; @@ -228,8 +227,8 @@ impl Value { apply_any(self.clone(), v) } - pub(crate) fn get_type(&self) -> Result, TypeError> { - Ok(Cow::Owned(self.as_internal().get_type()?.clone())) + pub(crate) fn get_type(&self) -> Result { + Ok(self.as_internal().get_type()?.clone()) } } -- cgit v1.2.3