Skip to content

Commit

Permalink
Remove unnecessary closures.
Browse files Browse the repository at this point in the history
  • Loading branch information
olson-sean-k committed Nov 9, 2023
1 parent 74ad5d8 commit ed2f3d9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/walk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ mod tests {
use tempfile::{self, TempDir};

use crate::walk::filter::{HierarchicalIterator, Separation, TreeResidue};
use crate::walk::{FileIterator, LinkBehavior, WalkBehavior};
use crate::walk::{FileIterator, GlobEntry, LinkBehavior, WalkBehavior};
use crate::Glob;

/// Writes a testing directory tree to a temporary location on the file system.
Expand Down Expand Up @@ -774,7 +774,7 @@ mod tests {
let paths: HashSet<_> = glob
.walk(&path)
.flatten()
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
assert_eq!(
paths,
Expand Down Expand Up @@ -805,7 +805,7 @@ mod tests {
let paths: HashSet<_> = glob
.walk(&path)
.flatten()
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
assert_eq!(
paths,
Expand All @@ -823,7 +823,7 @@ mod tests {
let paths: HashSet<_> = glob
.walk(&path)
.flatten()
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
assert_eq!(
paths,
Expand All @@ -841,7 +841,7 @@ mod tests {
let paths: HashSet<_> = glob
.walk(&path)
.flatten()
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
assert_eq!(paths, [path.join("src/lib.rs")].into_iter().collect());
}
Expand All @@ -854,7 +854,7 @@ mod tests {
let paths: HashSet<_> = glob
.walk(path.join(prefix))
.flatten()
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
assert_eq!(paths, [path.join("src/lib.rs")].into_iter().collect());
}
Expand Down Expand Up @@ -939,7 +939,7 @@ mod tests {
},
)
.flatten()
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
assert_eq!(
paths,
Expand All @@ -965,7 +965,7 @@ mod tests {
let paths: HashSet<_> = glob
.walk_with_behavior(&path, LinkBehavior::ReadFile)
.flatten()
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
assert_eq!(
paths,
Expand Down Expand Up @@ -1017,7 +1017,7 @@ mod tests {
// detecting the cycle while also introducing unexpected files so that the error can be
// detected.
.take(expected.len() + 1)
.map(|entry| entry.into_path())
.map(GlobEntry::into_path)
.collect();
paths.sort_unstable();
assert_eq!(paths, expected);
Expand Down

0 comments on commit ed2f3d9

Please sign in to comment.