mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 22:51:33 +02:00
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:
parent
93b7b0343f
commit
8509cbfd77
@ -176,7 +176,7 @@ fn wait_fs(rx: &Receiver<Event>, filter: &NotificationFilter, debounce: u64) ->
|
|||||||
let e = rx.recv().expect("error when reading event");
|
let e = rx.recv().expect("error when reading event");
|
||||||
|
|
||||||
if let Some(ref path) = e.path {
|
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
|
// Ignore cache for the initial file. Otherwise, in
|
||||||
// debug mode it's hard to track what's going on
|
// debug mode it's hard to track what's going on
|
||||||
let excluded = filter.is_excluded(path);
|
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);
|
let timeout = Duration::from_millis(debounce);
|
||||||
while let Ok(e) = rx.recv_timeout(timeout) {
|
while let Ok(e) = rx.recv_timeout(timeout) {
|
||||||
if let Some(ref path) = e.path {
|
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) {
|
if cache.contains_key(&pathop) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user