From 8509cbfd77378d17792a6040f61fc3168b68d117 Mon Sep 17 00:00:00 2001 From: Matt Gathu Date: Fri, 6 Oct 2017 14:31:36 +0300 Subject: [PATCH] fix (src/run.rs): fixed cargo clippy warnings This addresses warnings reported by cargo clippy on `src/run.rs`: * warning: this expression borrows a reference that is immediately dereferenced by the compiler reference: - https://rust-lang-nursery.github.io/rust-clippy/v0.0.165/index.html#needless_borrow - https://github.com/rust-lang-nursery/rust-clippy --- src/run.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/run.rs b/src/run.rs index 71c8999..0128301 100644 --- a/src/run.rs +++ b/src/run.rs @@ -176,7 +176,7 @@ fn wait_fs(rx: &Receiver, filter: &NotificationFilter, debounce: u64) -> let e = rx.recv().expect("error when reading event"); if let Some(ref path) = e.path { - let pathop = PathOp::new(&path, e.op.ok(), e.cookie); + let pathop = PathOp::new(path, e.op.ok(), e.cookie); // Ignore cache for the initial file. Otherwise, in // debug mode it's hard to track what's going on let excluded = filter.is_excluded(path); @@ -195,7 +195,7 @@ fn wait_fs(rx: &Receiver, filter: &NotificationFilter, debounce: u64) -> let timeout = Duration::from_millis(debounce); while let Ok(e) = rx.recv_timeout(timeout) { if let Some(ref path) = e.path { - let pathop = PathOp::new(&path, e.op.ok(), e.cookie); + let pathop = PathOp::new(path, e.op.ok(), e.cookie); if cache.contains_key(&pathop) { continue; }