Răsfoiți Sursa

fix(cli): do not crash on watcher (#6303)

Lucas Fernandes Nogueira 2 ani în urmă
părinte
comite
e8014a7f61
2 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 6 0
      .changes/cli-watcher-crash.md
  2. 1 1
      tooling/cli/src/interface/rust.rs

+ 6 - 0
.changes/cli-watcher-crash.md

@@ -0,0 +1,6 @@
+---
+"cli.rs": patch
+"cli.js": patch
+---
+
+Do not crash on Cargo.toml watcher.

+ 1 - 1
tooling/cli/src/interface/rust.rs

@@ -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();