Skip to content

Commit 9af3dbf

Browse files
committed
perf(net): use tokio::*join in tokio bench
1 parent 12c5918 commit 9af3dbf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compio/benches/net.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ fn echo_tokio(b: &mut Bencher, content: &[u8; BUFFER_SIZE]) {
3030
let start = Instant::now();
3131
for _i in 0..iter {
3232
let (mut tx, (mut rx, _)) =
33-
futures_util::try_join!(tokio::net::TcpStream::connect(addr), listener.accept())
34-
.unwrap();
33+
tokio::try_join!(tokio::net::TcpStream::connect(addr), listener.accept()).unwrap();
3534

3635
let client = async move {
3736
let mut buffer = [0u8; BUFFER_SIZE];
@@ -47,7 +46,7 @@ fn echo_tokio(b: &mut Bencher, content: &[u8; BUFFER_SIZE]) {
4746
rx.write_all(&buffer).await.unwrap();
4847
}
4948
};
50-
futures_util::join!(client, server);
49+
tokio::join!(client, server);
5150
}
5251
start.elapsed()
5352
})

0 commit comments

Comments
 (0)