diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-07-11 22:13:13 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-07-11 22:13:13 +0800 |
commit | ba78ae433d1ea905bf1efd751cec34901e509caa (patch) | |
tree | 2cf10628e36a875b1ae0352967dd6ed8178a9885 | |
parent | 901d29df066e8974b272c742ca4f9a9c7aa49dbc (diff) |
Replace flume with just std::sync::mpsc
-rw-r--r-- | Cargo.lock | 25 | ||||
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | src/interactive/app/eventloop.rs | 4 |
3 files changed, 8 insertions, 26 deletions
@@ -199,12 +199,11 @@ dependencies = [ [[package]] name = "crosstermion" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6230d2d1d8306a9aad35b85225e6a713da16421b6bc258bf58b982336257a5f9" +checksum = "032534543c938ffc4106ee75411f4b7be2e0260e044d17dae36f9409ada87895" dependencies = [ "crossterm", - "flume", "termion", "tui", "tui-react 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -236,7 +235,6 @@ dependencies = [ "colored", "crosstermion", "filesize", - "flume", "itertools", "jwalk", "num_cpus", @@ -272,15 +270,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" [[package]] -name = "flume" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "855e285c3835897065a6ba6f9463b44553eb9f29c7988d692f3d41283b47388b" -dependencies = [ - "spin", -] - -[[package]] name = "glob" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -561,9 +550,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_termios" @@ -620,12 +609,6 @@ dependencies = [ ] [[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -14,7 +14,7 @@ default = ["tui-crossplatform"] tui-unix = ["crosstermion/tui-react-termion", "tui-shared"] tui-crossplatform = ["crosstermion/tui-react-crossterm", "tui-shared"] -tui-shared = ["crosstermion/input-thread-flume", "tui", "tui-react", "open", "unicode-segmentation"] +tui-shared = ["tui", "tui-react", "open", "unicode-segmentation"] [dependencies] structopt = "0.3.15" @@ -25,13 +25,12 @@ petgraph = "0.5" itertools = "0.9.0" num_cpus = "1.10.0" filesize = "0.2.0" -flume = {version = "0.7.1", default-features = false} anyhow = "1.0.31" colored = "1.9.3" # 'tui' related unicode-segmentation = { version = "1.3.0", optional = true } -crosstermion = { optional = true, version = "0.1.3", default-features = false } +crosstermion = { optional = true, version = "0.2.0", default-features = false } tui = { version = "0.9.1", optional = true, default-features = false } tui-react = { version = "0.4", optional = true } open = { version = "1.2.2", optional = true } diff --git a/src/interactive/app/eventloop.rs b/src/interactive/app/eventloop.rs index 033f6e5..7333678 100644 --- a/src/interactive/app/eventloop.rs +++ b/src/interactive/app/eventloop.rs @@ -177,7 +177,7 @@ pub struct TerminalApp { pub window: MainWindow, } -type KeyboardInputAndApp = (flume::Receiver<Key>, TerminalApp); +type KeyboardInputAndApp = (std::sync::mpsc::Receiver<Key>, TerminalApp); impl TerminalApp { pub fn process_events<B>( @@ -215,7 +215,7 @@ impl TerminalApp { let mut window = MainWindow::default(); let keys_rx = match mode { Interaction::None => { - let (_, keys_rx) = flume::unbounded(); + let (_, keys_rx) = std::sync::mpsc::channel(); keys_rx } Interaction::Full => key_input_channel(), |