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
This commit is contained in:
Matt Gathu 2017-10-06 14:31:36 +03:00
parent 93b7b0343f
commit 8509cbfd77
No known key found for this signature in database
GPG Key ID: 89CE7A1A70AABF37
1 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ fn wait_fs(rx: &Receiver<Event>, 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<Event>, 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;
}