From c22e161f7bd97d4f6c063513cc051f6af2683d84 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 17 Mar 2020 23:01:35 +0000 Subject: Run clippy --- dhall/src/semantics/builtins.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dhall/src/semantics/builtins.rs') diff --git a/dhall/src/semantics/builtins.rs b/dhall/src/semantics/builtins.rs index 61de0c7..803630b 100644 --- a/dhall/src/semantics/builtins.rs +++ b/dhall/src/semantics/builtins.rs @@ -33,7 +33,7 @@ impl BuiltinClosure { pub fn apply(&self, a: Nir) -> NirKind { use std::iter::once; - let args = self.args.iter().cloned().chain(once(a.clone())).collect(); + let args = self.args.iter().cloned().chain(once(a)).collect(); apply_builtin(self.b, args, self.env.clone()) } /// This doesn't break the invariant because we already checked that the appropriate arguments @@ -415,7 +415,7 @@ fn apply_builtin(b: Builtin, args: Vec, env: NzEnv) -> NirKind { (Builtin::ListBuild, [t, f]) => { let list_t = Nir::from_builtin(Builtin::List).app(t.clone()); Ret::Nir( - f.app(list_t.clone()) + f.app(list_t) .app( make_closure(make_closure!( λ(T : Type) -> @@ -443,7 +443,7 @@ fn apply_builtin(b: Builtin, args: Vec, env: NzEnv) -> NirKind { let optional_t = Nir::from_builtin(Builtin::Optional).app(t.clone()); Ret::Nir( - f.app(optional_t.clone()) + f.app(optional_t) .app( make_closure(make_closure!( λ(T : Type) -> -- cgit v1.2.3