Skip to content

Commit 7058ac3

Browse files
authored
Use piper instead of async-pipe in tests (#96)
Since we were using a fork of an old library, just pulled in the smol equivalent. Signed-off-by: Ben Brandt <benjamin.j.brandt@gmail.com>
1 parent 6d9f244 commit 7058ac3

3 files changed

Lines changed: 30 additions & 16 deletions

File tree

Cargo.lock

Lines changed: 22 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ serde = { version = "1.0", features = ["derive", "rc"] }
4343
serde_json = { version = "1.0", features = ["raw_value"] }
4444

4545
[dev-dependencies]
46+
env_logger = "0.11"
47+
futures-util = { version = "0.3", features = ["io"] }
48+
piper = "0.2"
49+
pretty_assertions = "1.4.1"
50+
rustyline = "17.0.1"
51+
tokio-util = { version = "0.7.16", features = ["compat"] }
4652
tokio = { version = "1.0", features = [
4753
"macros",
4854
"rt",
@@ -53,9 +59,3 @@ tokio = { version = "1.0", features = [
5359
"process",
5460
"sync",
5561
] }
56-
tokio-util = { version = "0.7.16", features = ["compat"] }
57-
futures-util = { version = "0.3", features = ["io"] }
58-
async-pipe = { git = "https://github.com/zed-industries/async-pipe-rs", rev = "82d00a04211cf4e1236029aa03e6b6ce2a74c553" }
59-
env_logger = "0.11"
60-
rustyline = "17.0.1"
61-
pretty_assertions = "1.4.1"

rust/rpc_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ async fn create_connection_pair(
252252
client: TestClient,
253253
agent: TestAgent,
254254
) -> (ClientSideConnection, AgentSideConnection) {
255-
let (client_to_agent_tx, client_to_agent_rx) = async_pipe::pipe();
256-
let (agent_to_client_tx, agent_to_client_rx) = async_pipe::pipe();
255+
let (client_to_agent_rx, client_to_agent_tx) = piper::pipe(1024);
256+
let (agent_to_client_rx, agent_to_client_tx) = piper::pipe(1024);
257257

258258
let (agent_conn, agent_io_task) = ClientSideConnection::new(
259259
client.clone(),

0 commit comments

Comments
 (0)