more: use dev tty instead of mio to avoid panics (#6262)

* more: use dev tty instead of mio to avoid panics

* move more specific dependecy to more package
This commit is contained in:
Anton Patrushev 2024-04-23 19:48:21 +05:00 committed by GitHub
parent 7a2314cf4e
commit 423494421b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

12
Cargo.lock generated
View file

@ -664,6 +664,7 @@ checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df"
dependencies = [
"bitflags 2.4.2",
"crossterm_winapi",
"filedescriptor",
"libc",
"mio",
"parking_lot",
@ -843,6 +844,17 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31a7a908b8f32538a2143e59a6e4e2508988832d5d4d6f7c156b3cbc762643a5"
[[package]]
name = "filedescriptor"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e"
dependencies = [
"libc",
"thiserror",
"winapi",
]
[[package]]
name = "filetime"
version = "0.2.23"

View file

@ -24,6 +24,9 @@ unicode-segmentation = { workspace = true }
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
nix = { workspace = true }
[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { workspace = true, features = ["use-dev-tty"] }
[[bin]]
name = "more"
path = "src/main.rs"