summaryrefslogtreecommitdiffstats
path: root/src/args.rs
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2017-10-21 19:27:04 -0400
committerAndrew Gallant <jamslam@gmail.com>2017-10-21 22:40:09 -0400
commitcd575d99f854110a184c731e1eab3397259a12a7 (patch)
tree5a360f91a8fc364da8c9ec4a7125f38b8ca6c419 /src/args.rs
parent1267f01c246974b7e93a4f6dbbea6801d636c128 (diff)
ignore: upgrade to walkdir 2
The uninteresting bits of this commit involve mechanical changes for updates to walkdir 2. The more interesting bits of this commit are the breaking changes, although none of them should require any significant change on users of this library. The breaking changes are as follows: * `DirEntry::path_is_symbolic_link` has been renamed to `DirEntry::path_is_symlink`. This matches the conventions in the standard library, and also the corresponding name change in walkdir. * Removed the `From<walkdir::Error> for ignore::Error` impl. This was intended to only be used internally, but was the only thing that made `walkdir` a public dependency of `ignore`. Therefore, we remove it since it seems unnecessary. * Renamed `WalkBuilder::sort_by` to `WalkBuilder::sort_by_file_name`, and changed the type of the comparator from Fn(&OsString, &OsString) -> cmp::Ordering + 'static to Fn(&OsStr, &OsStr) -> cmp::Ordering + Send + Sync + 'static The corresponding change in `walkdir` retains the `sort_by` name, but gives the comparator a pair of `&DirEntry` values instead of a pair of `&OsStr` values. Ideally, `ignore` would hand off its own pair of `&ignore::DirEntry` values, but this requires more design work. So for now, we retain previous functionality, but leave room to make a proper `sort_by` method. [breaking-change]
Diffstat (limited to 'src/args.rs')
-rw-r--r--src/args.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/args.rs b/src/args.rs
index ff636d17..5d2e6880 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -287,7 +287,7 @@ impl Args {
wd.parents(!self.no_ignore_parent);
wd.threads(self.threads());
if self.sort_files {
- wd.sort_by(|a, b| a.cmp(b));
+ wd.sort_by_file_name(|a, b| a.cmp(b));
}
wd
}