summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2019-03-31 18:47:57 +0200
committerNadrieril2019-03-31 18:47:57 +0200
commitbfe3f7f75570540fa184a133653d16e86f22667a (patch)
treeab8df2a07f38539d4731cdff9b86d9d973055f21
parentf5d2151d35942b957230c3081a928af3619d9400 (diff)
rustfmt
-rw-r--r--dhall/tests/dhall_type.rs5
-rw-r--r--dhall_generator/src/dhall_type.rs4
-rw-r--r--iter_patterns/src/lib.rs3
3 files changed, 4 insertions, 8 deletions
diff --git a/dhall/tests/dhall_type.rs b/dhall/tests/dhall_type.rs
index faece20..941e3a4 100644
--- a/dhall/tests/dhall_type.rs
+++ b/dhall/tests/dhall_type.rs
@@ -33,10 +33,7 @@ fn test_dhall_type() {
#[derive(Type)]
#[allow(dead_code)]
struct C<T>(T, Option<String>);
- assert_eq!(
- <C<bool>>::get_type(),
- <(bool, Option<String>)>::get_type()
- );
+ assert_eq!(<C<bool>>::get_type(), <(bool, Option<String>)>::get_type());
#[derive(Type)]
#[allow(dead_code)]
diff --git a/dhall_generator/src/dhall_type.rs b/dhall_generator/src/dhall_type.rs
index ac8eb4e..270c27c 100644
--- a/dhall_generator/src/dhall_type.rs
+++ b/dhall_generator/src/dhall_type.rs
@@ -168,9 +168,7 @@ pub fn derive_type_inner(
// Ensure that all the fields have a Type impl
let mut where_clause = orig_where_clause.clone();
for ty in constraints.iter() {
- where_clause
- .predicates
- .push(parse_quote!(#ty: dhall::Type));
+ where_clause.predicates.push(parse_quote!(#ty: dhall::Type));
}
let ident = &input.ident;
diff --git a/iter_patterns/src/lib.rs b/iter_patterns/src/lib.rs
index a4be783..53ebcd2 100644
--- a/iter_patterns/src/lib.rs
+++ b/iter_patterns/src/lib.rs
@@ -36,7 +36,8 @@ macro_rules! destructure_iter {
)
};
// Special variable length pattern with a common unary variant
- (@match_forwards, $iter:expr, ($body:expr), $variant:ident ($x:ident).., $($rest:tt)*) => {
+ (@match_forwards, $iter:expr, ($body:expr),
+ $variant:ident ($x:ident).., $($rest:tt)*) => {
$crate::destructure_iter!(@match_backwards,
$iter,
({