Formatting
This commit is contained in:
parent
f4637892ab
commit
b5f56e831d
|
@ -207,11 +207,15 @@ where
|
|||
builder.ignores(ignores);
|
||||
|
||||
if args.occurrences_of("poll") > 0 {
|
||||
builder.poll_interval(Duration::from_millis(value_t!(args.value_of("poll"), u64).unwrap_or_else(|e| e.exit())));
|
||||
builder.poll_interval(Duration::from_millis(
|
||||
value_t!(args.value_of("poll"), u64).unwrap_or_else(|e| e.exit()),
|
||||
));
|
||||
}
|
||||
|
||||
if args.occurrences_of("debounce") > 0 {
|
||||
builder.debounce(Duration::from_millis(value_t!(args.value_of("debounce"), u64).unwrap_or_else(|e| e.exit())));
|
||||
builder.debounce(Duration::from_millis(
|
||||
value_t!(args.value_of("debounce"), u64).unwrap_or_else(|e| e.exit()),
|
||||
));
|
||||
}
|
||||
|
||||
builder.on_busy_update(if args.is_present("restart") {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//! .expect("mission failed");
|
||||
//! ```
|
||||
|
||||
use std::{time::Duration, path::PathBuf};
|
||||
use std::{path::PathBuf, time::Duration};
|
||||
|
||||
use crate::process::Shell;
|
||||
use crate::run::OnBusyUpdate;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use notify::{raw_watcher, PollWatcher, RecommendedWatcher, RecursiveMode};
|
||||
use std::convert::TryFrom;
|
||||
use std::time::Duration;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::time::Duration;
|
||||
|
||||
/// Thin wrapper over the notify crate
|
||||
///
|
||||
|
@ -32,7 +32,10 @@ impl Watcher {
|
|||
use notify::Watcher;
|
||||
|
||||
let imp = if poll {
|
||||
let mut watcher = PollWatcher::with_delay_ms(tx, u32::try_from(interval.as_millis()).unwrap_or(u32::MAX))?;
|
||||
let mut watcher = PollWatcher::with_delay_ms(
|
||||
tx,
|
||||
u32::try_from(interval.as_millis()).unwrap_or(u32::MAX),
|
||||
)?;
|
||||
for path in paths {
|
||||
watcher.watch(path, RecursiveMode::Recursive)?;
|
||||
debug!("Watching {:?}", path);
|
||||
|
|
Loading…
Reference in New Issue