From afa8212e9551c0421ec8137ada6f5d24b2cbfd34 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 12 Mar 2019 00:24:28 +0100 Subject: rustfmt --- dhall/src/typecheck.rs | 12 ++++++++++-- dhall_core/src/parser.rs | 31 +++++++++++++++---------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/dhall/src/typecheck.rs b/dhall/src/typecheck.rs index 00b8b47..c41bd89 100644 --- a/dhall/src/typecheck.rs +++ b/dhall/src/typecheck.rs @@ -223,7 +223,11 @@ where let kB = match tB { Const(k) => k, _ => { - return Err(TypeError::new(&ctx2, e, InvalidOutputType(tB))); + return Err(TypeError::new( + &ctx2, + e, + InvalidOutputType(tB), + )); } }; @@ -477,7 +481,11 @@ where match s { Const(Type) => {} _ => { - return Err(TypeError::new(ctx, e, InvalidOptionalType(*t))); + return Err(TypeError::new( + ctx, + e, + InvalidOptionalType(*t), + )); } } let n = xs.len(); diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs index f8e69db..57dd151 100644 --- a/dhall_core/src/parser.rs +++ b/dhall_core/src/parser.rs @@ -650,26 +650,25 @@ rule!(non_empty_optional; } ); - // List of rules that can be shortcutted as implemented in binop!() fn can_be_shortcutted(rule: Rule) -> bool { use Rule::*; match rule { - import_alt_expression | - or_expression | - plus_expression | - text_append_expression | - list_append_expression | - and_expression | - combine_expression | - prefer_expression | - combine_types_expression | - times_expression | - equal_expression | - not_equal_expression | - application_expression | - selector_expression_raw | - annotated_expression => true, + import_alt_expression + | or_expression + | plus_expression + | text_append_expression + | list_append_expression + | and_expression + | combine_expression + | prefer_expression + | combine_types_expression + | times_expression + | equal_expression + | not_equal_expression + | application_expression + | selector_expression_raw + | annotated_expression => true, _ => false, } } -- cgit v1.2.3