From 9970ca82a56b9e92151216d862a3102f2bc727d4 Mon Sep 17 00:00:00 2001 From: ThinkChaos Date: Tue, 5 May 2020 19:40:48 +0200 Subject: [PATCH] Run cargo fmt --- src/lib.rs | 2 +- src/tests/recursive.rs | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2d5f727..da5a94c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1303,7 +1303,7 @@ where /// Note this trait is required because we cannot implement `FnMut` /// for custom types yet. /// If we could, `FilterPredicateAdapter` would implement `FnMut` - // `TryFilterEntry` could just use `FnMut` and not +/// `TryFilterEntry` could just use `FnMut` and not /// this trait, and . /// /// [`TryFilterEntry`]: struct.TryFilterEntry.html diff --git a/src/tests/recursive.rs b/src/tests/recursive.rs index 91844c0..b158f13 100644 --- a/src/tests/recursive.rs +++ b/src/tests/recursive.rs @@ -884,9 +884,9 @@ fn try_filter_entry() { dir.mkdirp("foo/bar/baz/abc"); dir.mkdirp("quux"); - let wd = WalkDir::new(dir.path()) - .into_iter() - .try_filter_entry(|res| matches!(res, Ok(ent) if ent.file_name() != "baz")); + let wd = WalkDir::new(dir.path()).into_iter().try_filter_entry( + |res| matches!(res, Ok(ent) if ent.file_name() != "baz"), + ); let r = dir.run_recursive(wd); r.assert_no_errors(); @@ -911,9 +911,7 @@ fn try_filter_entry_skip_error() { let r = dir.run_recursive(wd); r.assert_no_errors(); - let expected = vec![ - dir.path().to_path_buf(), - ]; + let expected = vec![dir.path().to_path_buf()]; assert_eq!(expected, r.sorted_paths()); } @@ -948,9 +946,7 @@ fn filter_composition() { let r = dir.run_recursive(wd); r.assert_no_errors(); - let expected = vec![ - dir.path().to_path_buf(), - ]; + let expected = vec![dir.path().to_path_buf()]; assert_eq!(expected, r.sorted_paths()); }