From fe07620be3f6246f95e7a7b0cc6ef9676fdff6a4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 17 Feb 2022 07:34:18 -0800 Subject: [PATCH] Update to the io-lifetimes `impl AsFd for &T` support. Update to io-lifetimes 0.5.2 and `impl AsFd for &T` support added in rust-lang/rust#93888 and sunfishcode/io-lifetimes#18. --- Cargo.toml | 2 +- tests/api.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 51a938e..bafb542 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/sunfishcode/io-extras" exclude = ["/.github"] [dependencies] -io-lifetimes = { version = "0.5.1", default-features = false } +io-lifetimes = { version = "0.5.2", default-features = false } # Optionally depend on async-std to implement traits for its types. # diff --git a/tests/api.rs b/tests/api.rs index 66444c7..a249100 100644 --- a/tests/api.rs +++ b/tests/api.rs @@ -63,11 +63,11 @@ fn read_write() { struct Stream {} impl Stream { - fn use_socket(_socketlike: &mut Socketlike) {} + fn use_socket(_socketlike: Socketlike) {} - fn use_file(_filelike: &mut Filelike) {} + fn use_file(_filelike: Filelike) {} - fn use_grip(grip: &mut Grip) { + fn use_grip(grip: Grip) { #[cfg(windows)] assert_ne!( grip.as_handle_or_socket().as_handle().is_some(), @@ -86,10 +86,10 @@ impl Stream { #[test] fn likes() { - let _ = Stream::use_socket(&mut std::net::TcpListener::bind("127.0.0.1:0").unwrap()); - let _ = Stream::use_file(&mut std::fs::File::open("Cargo.toml").unwrap()); - let _ = Stream::use_grip(&mut std::net::TcpListener::bind("127.0.0.1:0").unwrap()); - let _ = Stream::use_grip(&mut std::fs::File::open("Cargo.toml").unwrap()); + let _ = Stream::use_socket(std::net::TcpListener::bind("127.0.0.1:0").unwrap()); + let _ = Stream::use_file(std::fs::File::open("Cargo.toml").unwrap()); + let _ = Stream::use_grip(std::net::TcpListener::bind("127.0.0.1:0").unwrap()); + let _ = Stream::use_grip(std::fs::File::open("Cargo.toml").unwrap()); let _ = Stream::from_socket(std::net::TcpListener::bind("127.0.0.1:0").unwrap()); let _ = Stream::from_file(std::fs::File::open("Cargo.toml").unwrap());