Avoid looping in demo (#486)

This commit is contained in:
Félix Saparelli 2023-01-21 21:56:42 +13:00 committed by GitHub
parent d92a7eb675
commit d6b1d36c6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ async fn main() -> Result<()> {
eprintln!("Switching to polling for funsies");
config.file_watcher(Watcher::Poll(Duration::from_millis(50)));
w.reconfigure(config)?;
} else {
} else if (action.events.iter().flat_map(Event::paths).next().is_some()) {
action.outcome(Outcome::if_running(
Outcome::both(Outcome::Stop, Outcome::Start),
Outcome::Start,