Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,18 @@ jobs:
matrix:
toolchain: ["nightly", "beta", "stable"]
setup:
- os: "ubuntu-20.04"
- os: "ubuntu-20.04"
- os: "ubuntu-22.04"
- os: "ubuntu-22.04"
features: "polling" # fusion
- os: "ubuntu-22.04"
features: "io-uring-sqe128,io-uring-cqe32,io-uring-socket"
- os: "ubuntu-22.04"
features: "io-uring-buf-ring"
- os: "ubuntu-22.04"
features: "polling,io-uring-buf-ring" # fusion & buf-ring
- os: "ubuntu-20.04"
features: "polling,ring"
no_default_features: true
- os: "ubuntu-22.04"
features: "polling,ring"
no_default_features: true
- os: "ubuntu-20.04"
features: "polling,native-tls,ring"
no_default_features: true
- os: "ubuntu-22.04"
features: "polling,native-tls,ring"
no_default_features: true
Expand Down
3 changes: 2 additions & 1 deletion compio-driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ impl Proactor {
///
/// # Safety
///
/// Caller must make sure to release the buffer pool with the correct driver, i.e., the one they created the buffer pool with.
/// Caller must make sure to release the buffer pool with the correct
/// driver, i.e., the one they created the buffer pool with.
pub unsafe fn release_buffer_pool(&mut self, buffer_pool: BufferPool) -> io::Result<()> {
self.driver.release_buffer_pool(buffer_pool)
}
Expand Down
2 changes: 1 addition & 1 deletion compio-macros/src/item_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl RawBodyItemFn {
}
}
} else {
panic!("Unsupported property {}", ident);
panic!("Unsupported property {ident}");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions compio-net/tests/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn poll_connect() {
match listener.accept() {
Ok(res) => break res,
Err(e) if e.kind() == io::ErrorKind::WouldBlock => continue,
Err(e) => panic!("{:?}", e),
Err(e) => panic!("{e:?}"),
}
}
};
Expand All @@ -60,7 +60,7 @@ async fn poll_connect() {
match tx.send(b"Hello world!") {
Ok(res) => break res,
Err(e) if is_would_block(&e) => {}
Err(e) => panic!("{:?}", e),
Err(e) => panic!("{e:?}"),
}
tx.write_ready().await.unwrap();
}
Expand All @@ -75,7 +75,7 @@ async fn poll_connect() {
break res;
}
Err(e) if is_would_block(&e) => {}
Err(e) => panic!("{:?}", e),
Err(e) => panic!("{e:?}"),
}
client.read_ready().await.unwrap();
}
Expand Down
2 changes: 1 addition & 1 deletion compio-net/tests/tcp_connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn test_connect_impl<A: ToSocketAddrsAsync>(mapping: impl FnOnce(&TcpListe
let client = async {
match TcpStream::connect(addr).await {
Ok(_) => (),
Err(e) => panic!("Failed to connect: {}", e),
Err(e) => panic!("Failed to connect: {e}"),
}
};

Expand Down
4 changes: 2 additions & 2 deletions compio-quic/benches/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ fn echo(c: &mut Criterion) {
group.throughput(Throughput::Bytes((data.len() * streams * 2) as u64));

group.bench_with_input(
BenchmarkId::new("compio-quic", format!("{}-streams-{}-bytes", streams, size)),
BenchmarkId::new("compio-quic", format!("{streams}-streams-{size}-bytes")),
&(),
|b, _| echo_compio_quic(b, data, streams),
);
group.bench_with_input(
BenchmarkId::new("quinn", format!("{}-streams-{}-bytes", streams, size)),
BenchmarkId::new("quinn", format!("{streams}-streams-{size}-bytes")),
&(),
|b, _| echo_quinn(b, data, streams),
);
Expand Down
6 changes: 3 additions & 3 deletions compio-quic/examples/http3-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async fn main() {
.unwrap();

{
println!("Connecting to {} at {}", host, remote);
println!("Connecting to {host} at {remote}");
let conn = endpoint.connect(remote, host, None).unwrap().await.unwrap();

let (mut conn, mut send_req) = compio_quic::h3::client::new(conn).await.unwrap();
Expand All @@ -60,7 +60,7 @@ async fn main() {
stream.finish().await.unwrap();

let resp = stream.recv_response().await.unwrap();
println!("{:?}", resp);
println!("{resp:?}");

let mut out = compio_fs::File::create(outpath).await.unwrap();
let mut pos = 0;
Expand All @@ -72,7 +72,7 @@ async fn main() {
pos += len as u64;
}
if let Some(headers) = stream.recv_trailers().await.unwrap() {
println!("{:?}", headers);
println!("{headers:?}");
}

drop(send_req);
Expand Down
2 changes: 1 addition & 1 deletion compio-quic/examples/http3-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn main() {
.unwrap();

while let Ok(Some((req, mut stream))) = conn.accept().await {
println!("Received request: {:?}", req);
println!("Received request: {req:?}");
stream
.send_response(
Response::builder()
Expand Down
2 changes: 1 addition & 1 deletion compio-quic/examples/quic-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async fn main() {

let mut buf = vec![];
recv.read_to_end(&mut buf).await.unwrap();
println!("{:?}", buf);
println!("{buf:?}");

conn.close(1u32.into(), b"bye");
}
Expand Down
2 changes: 1 addition & 1 deletion compio-quic/examples/quic-dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() {
.await
.unwrap();
let mut send = conn.open_uni().unwrap();
send.write_all(format!("Hello world {}!", i).as_bytes())
send.write_all(format!("Hello world {i}!").as_bytes())
.await
.unwrap();
send.finish().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion compio-quic/examples/quic-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async fn main() {

let mut buf = vec![];
recv.read_to_end(&mut buf).await.unwrap();
println!("{:?}", buf);
println!("{buf:?}");

send.write(&[4, 5, 6]).await.unwrap();
send.finish().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion compio/examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ async fn main() {
.unwrap();
assert_eq!(read, buffer.len());
let buffer = String::from_utf8(buffer).unwrap();
println!("{}", buffer);
println!("{buffer}");
file.close().await.unwrap();
}
2 changes: 1 addition & 1 deletion compio/examples/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async fn main() {
let addr = &addr;
async move {
let mut cli = TcpStream::connect(addr).await.unwrap();
cli.write_all(format!("Hello world {}!", i)).await.unwrap();
cli.write_all(format!("Hello world {i}!")).await.unwrap();
}
}));
while let Some(()) = futures.next().await {}
Expand Down
2 changes: 1 addition & 1 deletion compio/examples/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async fn main() {
})
.collect::<FuturesUnordered<_>>();
while let Some((addrs, name)) = tasks.next().await {
println!("Address of {}", name);
println!("Address of {name}");
for addr in addrs {
println!(" {}", addr.ip());
}
Expand Down
2 changes: 1 addition & 1 deletion compio/examples/tick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use futures_util::{FutureExt, select};
async fn main() {
let mut interval = interval(Duration::from_secs(2));
loop {
let mut ctrlc = ctrl_c();
let ctrlc = ctrl_c();
let ctrlc = std::pin::pin!(ctrlc);
select! {
res = ctrlc.fuse() => {
Expand Down