summaryrefslogtreecommitdiff
path: root/dhall_syntax/src
diff options
context:
space:
mode:
authorNadrieril2019-08-27 22:58:20 +0200
committerNadrieril2019-08-27 22:58:57 +0200
commita981afc465f4279a7a4d6ce3ac5844e04846613b (patch)
treefb548f87f2c6e5be73d0fc44ca49f44b6de80dba /dhall_syntax/src
parent7d11bebc8f2047bb5a26f7f52ae0bd1f60bb6367 (diff)
clippy
Diffstat (limited to 'dhall_syntax/src')
-rw-r--r--dhall_syntax/src/core/expr.rs2
-rw-r--r--dhall_syntax/src/core/import.rs2
-rw-r--r--dhall_syntax/src/parser.rs6
3 files changed, 5 insertions, 5 deletions
diff --git a/dhall_syntax/src/core/expr.rs b/dhall_syntax/src/core/expr.rs
index efbcee2..32166a6 100644
--- a/dhall_syntax/src/core/expr.rs
+++ b/dhall_syntax/src/core/expr.rs
@@ -331,7 +331,7 @@ impl<E> Expr<E> {
ExprF::BinOp(BinOp::ImportAlt, l, r) => l
.as_ref()
.traverse_resolve_with_visitor(visitor)
- .or(r.as_ref().traverse_resolve_with_visitor(visitor)),
+ .or_else(|_| r.as_ref().traverse_resolve_with_visitor(visitor)),
_ => {
let e = self.visit(&mut *visitor)?;
Ok(match &e {
diff --git a/dhall_syntax/src/core/import.rs b/dhall_syntax/src/core/import.rs
index 9329d48..d1f3fca 100644
--- a/dhall_syntax/src/core/import.rs
+++ b/dhall_syntax/src/core/import.rs
@@ -79,7 +79,7 @@ impl<SE> ImportLocation<SE> {
) -> Result<ImportLocation<SE2>, Err> {
use ImportLocation::*;
Ok(match self {
- Local(prefix, path) => Local(prefix.clone(), path.clone()),
+ Local(prefix, path) => Local(*prefix, path.clone()),
Remote(url) => Remote(url.visit_subexpr(f)?),
Env(env) => Env(env.clone()),
Missing => Missing,
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs
index 4da1dfc..d631a19 100644
--- a/dhall_syntax/src/parser.rs
+++ b/dhall_syntax/src/parser.rs
@@ -349,7 +349,7 @@ macro_rules! make_parser {
impl Parsers {
$(
- #[allow(non_snake_case, unused_variables)]
+ #[allow(non_snake_case, unused_variables, clippy::let_unit_value)]
fn $name<'a>(
(climbers, input): (&HashMap<Rule, PrecClimber<Rule>>, Rc<str>),
pair: Pair<'a, Rule>,
@@ -508,7 +508,7 @@ make_parser! {
0xAFFFE..=0xAFFFF | 0xBFFFE..=0xBFFFF |
0xCFFFE..=0xCFFFF | 0xDFFFE..=0xDFFFF |
0xEFFFE..=0xEFFFF | 0xFFFFE..=0xFFFFF |
- 0x10FFFE..=0x10FFFF => {
+ 0x10_FFFE..=0x10_FFFF => {
let c_ecapsed = c.escape_unicode();
Err(format!("Escape sequences can't contain non-characters: \"{}\"", c_ecapsed))?
},
@@ -1064,7 +1064,7 @@ make_parser! {
));
rule!(final_expression<ParsedSubExpr>; children!(
- [expression(e), EOI(_eoi)] => e
+ [expression(e), EOI(_)] => e
));
}