summaryrefslogtreecommitdiffstats
path: root/ignore
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-06-16 18:37:51 -0400
committerAndrew Gallant <jamslam@gmail.com>2019-06-16 18:37:51 -0400
commit7b9972c30876797103d6b51c14dd8f9bf1001c92 (patch)
treefa4e1c6c75c23de5a5552470d173e02d78bd5575 /ignore
parent9f000c29109cf369c4c28254f0cf9b9216a1950d (diff)
style: fix deprecations
Use `dyn` for trait objects and use `..=` for inclusive ranges.
Diffstat (limited to 'ignore')
-rw-r--r--ignore/src/walk.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ignore/src/walk.rs b/ignore/src/walk.rs
index 72459220..57f795c1 100644
--- a/ignore/src/walk.rs
+++ b/ignore/src/walk.rs
@@ -481,8 +481,8 @@ pub struct WalkBuilder {
#[derive(Clone)]
enum Sorter {
- ByName(Arc<Fn(&OsStr, &OsStr) -> cmp::Ordering + Send + Sync + 'static>),
- ByPath(Arc<Fn(&Path, &Path) -> cmp::Ordering + Send + Sync + 'static>),
+ ByName(Arc<dyn Fn(&OsStr, &OsStr) -> cmp::Ordering + Send + Sync + 'static>),
+ ByPath(Arc<dyn Fn(&Path, &Path) -> cmp::Ordering + Send + Sync + 'static>),
}
impl fmt::Debug for WalkBuilder {
@@ -1075,7 +1075,7 @@ impl WalkParallel {
pub fn run<F>(
self,
mut mkf: F,
- ) where F: FnMut() -> Box<FnMut(Result<DirEntry, Error>) -> WalkState + Send + 'static> {
+ ) where F: FnMut() -> Box<dyn FnMut(Result<DirEntry, Error>) -> WalkState + Send + 'static> {
let mut f = mkf();
let threads = self.threads();
// TODO: Figure out how to use a bounded channel here. With an
@@ -1253,7 +1253,7 @@ impl Work {
/// Note that a worker is *both* a producer and a consumer.
struct Worker {
/// The caller's callback.
- f: Box<FnMut(Result<DirEntry, Error>) -> WalkState + Send + 'static>,
+ f: Box<dyn FnMut(Result<DirEntry, Error>) -> WalkState + Send + 'static>,
/// The push side of our mpmc queue.
tx: channel::Sender<Message>,
/// The receive side of our mpmc queue.