From 4c840270cf69f9580b18c43736bd247cab74e896 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 14 Apr 2019 23:39:19 +0200 Subject: clippy --- dhall_core/src/parser.rs | 2 +- dhall_core/src/visitor.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'dhall_core') diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs index cae6cbd..cea7cea 100644 --- a/dhall_core/src/parser.rs +++ b/dhall_core/src/parser.rs @@ -26,7 +26,7 @@ pub type ParseError = pest::error::Error; pub type ParseResult = Result; -fn rc<'a>(x: ParsedExpr<'a>) -> ParsedSubExpr<'a> { +fn rc(x: ParsedExpr<'_>) -> ParsedSubExpr<'_> { crate::rc(x) } diff --git a/dhall_core/src/visitor.rs b/dhall_core/src/visitor.rs index 3efd920..b0424ac 100644 --- a/dhall_core/src/visitor.rs +++ b/dhall_core/src/visitor.rs @@ -79,7 +79,7 @@ where input: &'a ExprF, ) -> Result, T::Error> { fn vec<'a, T, U, Err, F: FnMut(&'a T) -> Result>( - x: &'a Vec, + x: &'a [T], f: F, ) -> Result, Err> { x.iter().map(f).collect() @@ -102,7 +102,7 @@ where L2: Ord, V: ExprFFallibleVisitor<'a, SE, SE2, L, L2, N, N2, E, E2>, { - x.into_iter() + x.iter() .map(|(k, x)| Ok((v.visit_label(k)?, v.visit_subexpr(x)?))) .collect() } -- cgit v1.2.3