diff options
author | Nadrieril | 2021-04-03 14:22:32 +0000 |
---|---|---|
committer | GitHub | 2021-04-03 14:22:32 +0000 |
commit | 527194222bbdcf559cfec3aac9b43c9ea05c2d6e (patch) | |
tree | 22b4fed4105d8b0a6e4fa53c97e855542b61a8fb /dhall/src | |
parent | 846c14f92bda2fb3e68c3debf940414628013574 (diff) | |
parent | c331dcfaed6177a322de50fed418aa619210e88b (diff) |
Merge pull request #215 from cstorey/remove-redundant-semicolons
Diffstat (limited to 'dhall/src')
-rw-r--r-- | dhall/src/builtins.rs | 7 | ||||
-rw-r--r-- | dhall/src/lib.rs | 3 | ||||
-rw-r--r-- | dhall/src/semantics/resolve/resolve.rs | 2 | ||||
-rw-r--r-- | dhall/src/semantics/tck/typecheck.rs | 2 | ||||
-rw-r--r-- | dhall/src/syntax/text/parser.rs | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/dhall/src/builtins.rs b/dhall/src/builtins.rs index 123e03d..82cb5ff 100644 --- a/dhall/src/builtins.rs +++ b/dhall/src/builtins.rs @@ -451,9 +451,10 @@ fn apply_builtin<'cx>( ); Ret::Nir(Nir::from_kind(NirKind::TextLit( - nze::nir::TextLit::new( - parts.intersperse(replacement), - ), + nze::nir::TextLit::new(Itertools::intersperse( + parts, + replacement, + )), ))) } } else { diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs index 86ef99e..fb35b75 100644 --- a/dhall/src/lib.rs +++ b/dhall/src/lib.rs @@ -7,7 +7,8 @@ clippy::new_without_default, clippy::try_err, clippy::unnecessary_wraps, - clippy::useless_format + clippy::useless_format, + clippy::needless_question_mark, )] pub mod builtins; diff --git a/dhall/src/semantics/resolve/resolve.rs b/dhall/src/semantics/resolve/resolve.rs index 7d74cd6..5ec16e5 100644 --- a/dhall/src/semantics/resolve/resolve.rs +++ b/dhall/src/semantics/resolve/resolve.rs @@ -558,7 +558,7 @@ pub fn skip_resolve<'cx>( parsed: Parsed, ) -> Result<Resolved<'cx>, Error> { let parsed = Parsed::from_expr_without_imports(parsed.0); - Ok(resolve(cx, parsed)?) + resolve(cx, parsed) } impl Parsed { diff --git a/dhall/src/semantics/tck/typecheck.rs b/dhall/src/semantics/tck/typecheck.rs index 23c2bd2..b0a4f21 100644 --- a/dhall/src/semantics/tck/typecheck.rs +++ b/dhall/src/semantics/tck/typecheck.rs @@ -256,7 +256,7 @@ pub fn type_with<'cx, 'hir>( HirKind::Expr(ExprKind::Let(binder, annot, val, body)) => { let val_annot = annot .as_ref() - .map(|t| Ok(type_with(env, t, None)?.eval_to_type(env)?)) + .map(|t| type_with(env, t, None)?.eval_to_type(env)) .transpose()?; let val = type_with(env, &val, val_annot)?; let val_nf = val.eval(env); diff --git a/dhall/src/syntax/text/parser.rs b/dhall/src/syntax/text/parser.rs index 07921b5..d17ac61 100644 --- a/dhall/src/syntax/text/parser.rs +++ b/dhall/src/syntax/text/parser.rs @@ -279,9 +279,7 @@ impl DhallParser { trim_indent(&mut lines); - lines - .into_iter() - .intersperse(newline) + Itertools::intersperse(lines.into_iter(), newline) .flat_map(InterpolatedText::into_iter) .collect::<ParsedText>() } |