From 372234b91220987d3ed21317c927f6a027aab525 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 4 Dec 2023 15:34:26 +0100 Subject: [PATCH] tokio-xmpp: Remove workaround for Debian oldoldstable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hickory-resolver’s MSRV is 1.67, those super old toolchain versions wouldn’t build a recent version of tokio-xmpp anyway. This effectively reverts 52a2d962ee1e5e67314b815ff8840071de0d5a16. --- parsers/Cargo.toml | 3 --- tokio-xmpp/Cargo.toml | 3 --- tokio-xmpp/build.rs | 11 ----------- tokio-xmpp/src/xmpp_stream.rs | 20 ++++---------------- 4 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 tokio-xmpp/build.rs diff --git a/parsers/Cargo.toml b/parsers/Cargo.toml index a72201b..5439371 100644 --- a/parsers/Cargo.toml +++ b/parsers/Cargo.toml @@ -24,9 +24,6 @@ sha3 = "0.10" blake2 = "0.10.4" chrono = { version = "0.4.5", default-features = false, features = ["std"] } -[build-dependencies] -rustc_version = "0.4" - [features] # Build xmpp-parsers to make components instead of clients. component = [] diff --git a/tokio-xmpp/Cargo.toml b/tokio-xmpp/Cargo.toml index c273814..b4ff77a 100644 --- a/tokio-xmpp/Cargo.toml +++ b/tokio-xmpp/Cargo.toml @@ -34,9 +34,6 @@ syntect = { version = "5", optional = true } [dev-dependencies] env_logger = { version = "0.10", default-features = false, features = ["auto-color", "humantime"] } -[build-dependencies] -rustc_version = "0.4" - [features] default = ["tls-native"] tls-rust = ["tokio-rustls", "webpki-roots"] diff --git a/tokio-xmpp/build.rs b/tokio-xmpp/build.rs deleted file mode 100644 index 6022bd5..0000000 --- a/tokio-xmpp/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -use rustc_version::version; - -fn main() { - let version = version().unwrap(); - - for major in 1..=version.major { - for minor in 0..=version.minor { - println!("cargo:rustc-cfg=rustc_least_{}_{}", major, minor); - } - } -} diff --git a/tokio-xmpp/src/xmpp_stream.rs b/tokio-xmpp/src/xmpp_stream.rs index 1b13a0c..c1f82ba 100644 --- a/tokio-xmpp/src/xmpp_stream.rs +++ b/tokio-xmpp/src/xmpp_stream.rs @@ -105,28 +105,19 @@ impl Sink for XMPPStream { Poll::Ready(Ok(())) } - fn start_send( - #[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>, - item: Packet, - ) -> Result<(), Self::Error> { + fn start_send(mut self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error> { Pin::new(&mut self.stream) .start_send(item) .map_err(|e| e.into()) } - fn poll_flush( - #[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>, - cx: &mut Context, - ) -> Poll> { + fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { Pin::new(&mut self.stream) .poll_flush(cx) .map_err(|e| e.into()) } - fn poll_close( - #[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>, - cx: &mut Context, - ) -> Poll> { + fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { Pin::new(&mut self.stream) .poll_close(cx) .map_err(|e| e.into()) @@ -137,10 +128,7 @@ impl Sink for XMPPStream { impl Stream for XMPPStream { type Item = Result; - fn poll_next( - #[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>, - cx: &mut Context, - ) -> Poll> { + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { Pin::new(&mut self.stream) .poll_next(cx) .map(|result| result.map(|result| result.map_err(|e| e.into())))