Skip to content

Commit

Permalink
Missed matches! in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkChaos committed May 5, 2020
1 parent 9970ca8 commit 67ffa46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tests/recursive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
res.as_ref().map(|ent| ent.file_name() != "baz").unwrap_or(false)
});
let r = dir.run_recursive(wd);
r.assert_no_errors();

Expand Down

0 comments on commit 67ffa46

Please sign in to comment.