Eliminate a few more futures dependencies.

pull/11/head
Blaž Hrastnik 4 years ago
parent 355ad3cb82
commit 1ad0581ddd

60
Cargo.lock generated

@ -185,54 +185,12 @@ dependencies = [
"new_debug_unreachable", "new_debug_unreachable",
] ]
[[package]]
name = "futures"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9d5813545e459ad3ca1bff9915e9ad7f1a47dc6a91b627ce321d5863b7dd253"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-channel"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce79c6a52a299137a6013061e0cf0e688fce5d7f1bc60125f520912fdb29ec25"
dependencies = [
"futures-core",
"futures-sink",
]
[[package]] [[package]]
name = "futures-core" name = "futures-core"
version = "0.3.14" version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "098cd1c6dda6ca01650f1a37a794245eb73181d0d4d4e955e2f3c37db7af1815" checksum = "098cd1c6dda6ca01650f1a37a794245eb73181d0d4d4e955e2f3c37db7af1815"
[[package]]
name = "futures-executor"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10f6cb7042eda00f0049b1d2080aa4b93442997ee507eb3828e8bd7577f94c9d"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-io"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "365a1a1fb30ea1c03a830fdb2158f5236833ac81fa0ad12fe35b29cddc35cb04"
[[package]] [[package]]
name = "futures-macro" name = "futures-macro"
version = "0.3.14" version = "0.3.14"
@ -245,12 +203,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "futures-sink"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c5629433c555de3d82861a7a4e3794a4c40040390907cfbfd7143a92a426c23"
[[package]] [[package]]
name = "futures-task" name = "futures-task"
version = "0.3.14" version = "0.3.14"
@ -263,13 +215,9 @@ version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c144ad54d60f23927f0a6b6d816e4271278b64f005ad65e4e35291d2de9c025" checksum = "3c144ad54d60f23927f0a6b6d816e4271278b64f005ad65e4e35291d2de9c025"
dependencies = [ dependencies = [
"futures-channel",
"futures-core", "futures-core",
"futures-io",
"futures-macro", "futures-macro",
"futures-sink",
"futures-task", "futures-task",
"memchr",
"pin-project-lite", "pin-project-lite",
"pin-utils", "pin-utils",
"proc-macro-hack", "proc-macro-hack",
@ -405,7 +353,6 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"crossterm", "crossterm",
"futures-util",
"helix-core", "helix-core",
"helix-lsp", "helix-lsp",
"once_cell", "once_cell",
@ -491,11 +438,10 @@ dependencies = [
[[package]] [[package]]
name = "jsonrpc-core" name = "jsonrpc-core"
version = "17.0.0" version = "17.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/paritytech/jsonrpc#609d7a6cc160742d035510fa89fb424ccf077660"
checksum = "07569945133257ff557eb37b015497104cea61a2c9edaf126c1cbd6e8332397f"
dependencies = [ dependencies = [
"futures", "futures-util",
"log", "log",
"serde", "serde",
"serde_derive", "serde_derive",

@ -21,7 +21,8 @@ glob = "0.3"
anyhow = "1" anyhow = "1"
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
jsonrpc-core = "17.0" # jsonrpc-core = { version = "17.1", default-features = false } # don't pull in all of futures
futures-util = "0.3" jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc", default-features = false } # don't pull in all of futures
futures-util = { version = "0.3", features = ["std", "async-await"] }
thiserror = "1.0" thiserror = "1.0"
log = "~0.4" log = "~0.4"

@ -25,7 +25,7 @@ tui = { version = "0.15", default-features = false, features = ["crossterm"] }
crossterm = { version = "0.19", features = ["event-stream"] } crossterm = { version = "0.19", features = ["event-stream"] }
clap = { version = "3.0.0-beta.2 ", default-features = false, features = ["std", "cargo"] } clap = { version = "3.0.0-beta.2 ", default-features = false, features = ["std", "cargo"] }
futures-util = "0.3" futures-util = { version = "0.3", features = ["std", "async-await"] }
# Logging # Logging
fern = "0.6" fern = "0.6"

@ -23,7 +23,6 @@ use crossterm::{
use tui::layout::Rect; use tui::layout::Rect;
// use futures_util::future::BoxFuture;
use futures_util::stream::FuturesUnordered; use futures_util::stream::FuturesUnordered;
use std::pin::Pin; use std::pin::Pin;
@ -92,15 +91,16 @@ impl Application {
break; break;
} }
use futures_util::{select, FutureExt, StreamExt}; use futures_util::StreamExt;
select! {
event = reader.next().fuse() => { tokio::select! {
event = reader.next() => {
self.handle_terminal_events(event) self.handle_terminal_events(event)
} }
call = futures_util::StreamExt::select_next_some(&mut self.editor.language_servers.incoming) => { Some(call) = self.editor.language_servers.incoming.next() => {
self.handle_language_server_message(call).await self.handle_language_server_message(call).await
} }
callback = futures_util::StreamExt::select_next_some(&mut self.callbacks) => { Some(callback) = &mut self.callbacks.next() => {
self.handle_language_server_callback(callback) self.handle_language_server_callback(callback)
} }
} }

@ -22,7 +22,6 @@ once_cell = "1.4"
url = "2" url = "2"
tokio = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] }
futures-util = "0.3"
slotmap = "1" slotmap = "1"

Loading…
Cancel
Save