Skip to content

Commit 72571df

Browse files
committed
fix: update rustix to fix the enable_raw_mode() error on WSL/Android
crossterm-rs/crossterm#926 (comment)
1 parent 0cdaff9 commit 72571df

File tree

6 files changed

+51
-51
lines changed

6 files changed

+51
-51
lines changed

Cargo.lock

+39-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ anyhow = "1.0.86"
1515
arc-swap = "1.7.1"
1616
base64 = "0.22.1"
1717
bitflags = "2.6.0"
18-
clap = { version = "4.5.16", features = [ "derive" ] }
18+
clap = { version = "4.5.17", features = [ "derive" ] }
1919
crossterm = { version = "0.28.1", features = [ "event-stream" ] }
2020
dirs = "5.0.1"
2121
futures = "0.3.30"
@@ -28,11 +28,11 @@ ratatui = { version = "0.28.1", features = [ "unstable-rendered-line-info"
2828
regex = "1.10.6"
2929
scopeguard = "1.2.0"
3030
serde = { version = "1.0.209", features = [ "derive" ] }
31-
serde_json = "1.0.127"
31+
serde_json = "1.0.128"
3232
shell-words = "1.1.0"
3333
tokio = { version = "1.40.0", features = [ "full" ] }
34-
tokio-stream = "0.1.15"
35-
tokio-util = "0.7.11"
34+
tokio-stream = "0.1.16"
35+
tokio-util = "0.7.12"
3636
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
3737
unicode-width = "0.1.13"
3838
uzers = "0.12.1"

yazi-boot/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ serde = { workspace = true }
2020

2121
[build-dependencies]
2222
clap = { workspace = true }
23-
clap_complete = "4.5.24"
23+
clap_complete = "4.5.26"
2424
clap_complete_fig = "4.5.2"
2525
clap_complete_nushell = "4.5.3"
2626
vergen-gitcl = { version = "1.0.0", features = [ "build" ] }

yazi-cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ yazi-shared = { path = "../yazi-shared", version = "0.3.3" }
2828
# External build dependencies
2929
anyhow = { workspace = true }
3030
clap = { workspace = true }
31-
clap_complete = "4.5.24"
31+
clap_complete = "4.5.26"
3232
clap_complete_fig = "4.5.2"
3333
clap_complete_nushell = "4.5.3"
3434
serde_json = { workspace = true }

yazi-core/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ bitflags = { workspace = true }
2525
crossterm = { workspace = true }
2626
dirs = { workspace = true }
2727
futures = { workspace = true }
28-
notify-fork = { version = "6.1.1", default-features = false, features = [ "macos_fsevent" ] }
28+
notify = { package = "notify-fork", version = "6.1.1", default-features = false, features = [ "macos_fsevent" ] }
2929
parking_lot = { workspace = true }
3030
ratatui = { workspace = true }
3131
scopeguard = { workspace = true }

yazi-core/src/manager/watcher.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::{collections::{HashMap, HashSet}, time::Duration};
22

33
use anyhow::Result;
4-
use notify_fork::{PollWatcher, RecommendedWatcher, RecursiveMode, Watcher as _Watcher};
4+
use notify::{PollWatcher, RecommendedWatcher, RecursiveMode, Watcher as _Watcher};
55
use parking_lot::RwLock;
66
use tokio::{fs, pin, sync::{mpsc::{self, UnboundedReceiver}, watch}};
77
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
@@ -27,7 +27,7 @@ impl Watcher {
2727
let (out_tx, out_rx) = mpsc::unbounded_channel();
2828

2929
let out_tx_ = out_tx.clone();
30-
let handler = move |res: Result<notify_fork::Event, notify_fork::Error>| {
30+
let handler = move |res: Result<notify::Event, notify::Error>| {
3131
let Ok(event) = res else { return };
3232
if event.kind.is_access() {
3333
return;
@@ -37,7 +37,7 @@ impl Watcher {
3737
}
3838
};
3939

40-
let config = notify_fork::Config::default().with_poll_interval(Duration::from_millis(500));
40+
let config = notify::Config::default().with_poll_interval(Duration::from_millis(500));
4141
if *yazi_adapter::WSL {
4242
tokio::spawn(Self::fan_in(in_rx, PollWatcher::new(handler, config).unwrap()));
4343
} else {
@@ -79,7 +79,7 @@ impl Watcher {
7979
});
8080
}
8181

82-
async fn fan_in(mut rx: watch::Receiver<HashSet<Url>>, mut watcher: impl notify_fork::Watcher) {
82+
async fn fan_in(mut rx: watch::Receiver<HashSet<Url>>, mut watcher: impl notify::Watcher) {
8383
loop {
8484
let (mut to_unwatch, mut to_watch): (HashSet<_>, HashSet<_>) = {
8585
let (new, old) = (&*rx.borrow_and_update(), &*WATCHED.read());
@@ -88,7 +88,7 @@ impl Watcher {
8888

8989
to_unwatch.retain(|u| match watcher.unwatch(u) {
9090
Ok(_) => true,
91-
Err(e) if matches!(e.kind, notify_fork::ErrorKind::WatchNotFound) => true,
91+
Err(e) if matches!(e.kind, notify::ErrorKind::WatchNotFound) => true,
9292
Err(e) => {
9393
error!("Unwatch failed: {e:?}");
9494
false

0 commit comments

Comments
 (0)