Skip to content

Commit

Permalink
fix(cli): do not crash on watcher (#6303)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Feb 18, 2023
1 parent 138cb8d commit e8014a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/cli-watcher-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Do not crash on Cargo.toml watcher.
2 changes: 1 addition & 1 deletion tooling/cli/src/interface/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl Interface for Rust {
let (tx, rx) = sync_channel(1);
let mut watcher = new_debouncer(Duration::from_secs(1), None, move |r| {
if let Ok(events) = r {
tx.send(events).unwrap()
let _ = tx.send(events);
}
})
.unwrap();
Expand Down

0 comments on commit e8014a7

Please sign in to comment.