diff options
author | Nadrieril | 2019-04-14 23:39:19 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-14 23:39:19 +0200 |
commit | 4c840270cf69f9580b18c43736bd247cab74e896 (patch) | |
tree | daff82a16a54f30309b79e29782017732ae2b9fc /dhall_core | |
parent | 2cf1fcbafce4cb27c08d16cc5b8c5943299ed707 (diff) |
clippy
Diffstat (limited to 'dhall_core')
-rw-r--r-- | dhall_core/src/parser.rs | 2 | ||||
-rw-r--r-- | dhall_core/src/visitor.rs | 4 |
2 files changed, 3 insertions, 3 deletions
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<Rule>; pub type ParseResult<T> = Result<T, ParseError>; -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<SE1, L1, N1, E1>, ) -> Result<ExprF<SE2, L2, N2, E2>, T::Error> { fn vec<'a, T, U, Err, F: FnMut(&'a T) -> Result<U, Err>>( - x: &'a Vec<T>, + x: &'a [T], f: F, ) -> Result<Vec<U>, 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() } |