Skip to content

Commit c8cf3a3

Browse files
author
Jorge Aparicio
committed
rustc: replace pick alias with an unboxed closure
1 parent 1d21dad commit c8cf3a3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: src/librustc/metadata/filesearch.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ pub enum FileMatch {
3030
// FIXME (#2658): I'm not happy how this module turned out. Should
3131
// probably just be folded into cstore.
3232

33-
/// Functions with type `pick` take a parent directory as well as
34-
/// a file found in that directory.
35-
pub type pick<'a> = |path: &Path|: 'a -> FileMatch;
36-
3733
pub struct FileSearch<'a> {
3834
pub sysroot: &'a Path,
3935
pub search_paths: &'a SearchPaths,
@@ -95,7 +91,7 @@ impl<'a> FileSearch<'a> {
9591
make_target_lib_path(self.sysroot, self.triple)
9692
}
9793

98-
pub fn search(&self, pick: pick) {
94+
pub fn search<F>(&self, mut pick: F) where F: FnMut(&Path) -> FileMatch {
9995
self.for_each_lib_search_path(|lib_search_path| {
10096
debug!("searching {}", lib_search_path.display());
10197
match fs::readdir(lib_search_path) {

0 commit comments

Comments
 (0)