summaryrefslogtreecommitdiff
path: root/dhall/src/core
diff options
context:
space:
mode:
authorNadrieril2019-08-20 18:11:05 +0200
committerNadrieril2019-08-20 18:11:05 +0200
commitc157df5e66fb80ff6184cb3934e5b0883f0fdbf0 (patch)
treeca4fdec980b0286c06cd917583f9ca49cc9087fd /dhall/src/core
parent4f1f37cfc115510500e83d2dfbfa8ed7ddeae74a (diff)
No need for Cow in return type of get_type
Diffstat (limited to 'dhall/src/core')
-rw-r--r--dhall/src/core/value.rs5
1 files changed, 2 insertions, 3 deletions
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<Cow<'_, Value>, TypeError> {
- Ok(Cow::Owned(self.as_internal().get_type()?.clone()))
+ pub(crate) fn get_type(&self) -> Result<Value, TypeError> {
+ Ok(self.as_internal().get_type()?.clone())
}
}