Buffer all incoming file-system events

Antonio Scandurra and Nathan Sobo created

This avoids a problem where the operating system would drop events
on the floor and tell us to rescan the entire directory, which in turn
would cause a flicker in the project browser.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Change summary

crates/project/src/fs.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/project/src/fs.rs 🔗

@@ -115,7 +115,7 @@ impl Fs for RealFs {
         path: &Path,
         latency: Duration,
     ) -> Pin<Box<dyn Send + Stream<Item = Vec<fsevent::Event>>>> {
-        let (mut tx, rx) = postage::mpsc::channel(64);
+        let (tx, rx) = smol::channel::unbounded();
         let (stream, handle) = EventStream::new(&[path], latency);
         std::mem::forget(handle);
         std::thread::spawn(move || {