From df3f3785f251bfa84ab7df65e26ff8cbc73c2e2e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 16 Apr 2019 16:15:41 +0200 Subject: Naming tweaks --- dhall/src/normalize.rs | 20 ++++++++++---------- dhall/src/traits/deserialize.rs | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'dhall/src') diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index 58deb87..fa669d8 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -19,10 +19,10 @@ impl<'a> Typed<'a> { } } -fn apply_builtin(b: Builtin, args: &[Expr]) -> WhatNext +fn apply_builtin(b: Builtin, args: &[Expr]) -> WhatNext where - S: fmt::Debug + Clone, - A: fmt::Debug + Clone, + N: fmt::Debug + Clone, + E: fmt::Debug + Clone, { use dhall_core::Builtin::*; use dhall_core::ExprF::*; @@ -209,19 +209,19 @@ where // Put the remaining arguments back and eval again. In most cases // ret will not be of a form that can be applied, so this won't go very deep. // In lots of cases, there are no remaining args so this cann will just return ret. - let rest: Vec> = rest.iter().map(ExprF::roll).collect(); + let rest: Vec> = rest.iter().map(ExprF::roll).collect(); Continue(ExprF::App(ret, rest)) } // Small enum to help with being DRY -enum WhatNext<'a, S, A> { +enum WhatNext<'a, N, E> { // Recurse on this expression - Continue(Expr), - ContinueSub(SubExpr), + Continue(Expr), + ContinueSub(SubExpr), // The following expression is the normal form - Done(Expr), - DoneRef(&'a Expr), - DoneRefSub(&'a SubExpr), + Done(Expr), + DoneRef(&'a Expr), + DoneRefSub(&'a SubExpr), // The current expression is already in normal form DoneAsIs, } diff --git a/dhall/src/traits/deserialize.rs b/dhall/src/traits/deserialize.rs index cbe9aa3..43eb2ac 100644 --- a/dhall/src/traits/deserialize.rs +++ b/dhall/src/traits/deserialize.rs @@ -7,9 +7,9 @@ use crate::expr::*; /// can deserialize. /// /// This trait cannot be implemented manually. -pub trait Deserialize<'a>: Sized { +pub trait Deserialize<'de>: Sized { /// See [dhall::de::from_str][crate::de::from_str] - fn from_str(s: &'a str, ty: Option<&Type>) -> Result; + fn from_str(s: &'de str, ty: Option<&Type>) -> Result; } impl<'de: 'a, 'a> Deserialize<'de> for Parsed<'a> { -- cgit v1.2.3