summaryrefslogtreecommitdiff
path: root/dhall/src/traits/dynamic_type.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/src/traits/dynamic_type.rs')
-rw-r--r--dhall/src/traits/dynamic_type.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/dhall/src/traits/dynamic_type.rs b/dhall/src/traits/dynamic_type.rs
index 66af320..d03f8cd 100644
--- a/dhall/src/traits/dynamic_type.rs
+++ b/dhall/src/traits/dynamic_type.rs
@@ -2,21 +2,21 @@ use crate::expr::*;
use crate::traits::StaticType;
use crate::typecheck::{TypeError, TypeMessage};
use dhall_core::context::Context;
-use dhall_core::{Const, ExprF, X};
+use dhall_core::{Const, ExprF};
use std::borrow::Cow;
pub trait DynamicType {
- fn get_type<'a>(&'a self) -> Result<Cow<'a, Type>, TypeError<X>>;
+ fn get_type<'a>(&'a self) -> Result<Cow<'a, Type>, TypeError>;
}
impl<T: StaticType> DynamicType for T {
- fn get_type<'a>(&'a self) -> Result<Cow<'a, Type>, TypeError<X>> {
+ fn get_type<'a>(&'a self) -> Result<Cow<'a, Type>, TypeError> {
Ok(Cow::Owned(T::get_static_type()))
}
}
impl DynamicType for Type {
- fn get_type(&self) -> Result<Cow<'_, Type>, TypeError<X>> {
+ fn get_type(&self) -> Result<Cow<'_, Type>, TypeError> {
use TypeInternal::*;
match &self.0 {
Expr(e) => e.get_type(),
@@ -30,7 +30,7 @@ impl DynamicType for Type {
}
impl DynamicType for Normalized {
- fn get_type(&self) -> Result<Cow<'_, Type>, TypeError<X>> {
+ fn get_type(&self) -> Result<Cow<'_, Type>, TypeError> {
match &self.1 {
Some(t) => Ok(Cow::Borrowed(t)),
None => Err(TypeError::new(
@@ -43,7 +43,7 @@ impl DynamicType for Normalized {
}
impl DynamicType for Typed {
- fn get_type(&self) -> Result<Cow<'_, Type>, TypeError<X>> {
+ fn get_type(&self) -> Result<Cow<'_, Type>, TypeError> {
match &self.1 {
Some(t) => Ok(Cow::Borrowed(t)),
None => Err(TypeError::new(