tokio-xmpp: Remove workaround for Debian oldoldstable
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 52a2d962ee.
This commit is contained in:
parent
50415415c6
commit
372234b912
4 changed files with 4 additions and 33 deletions
|
|
@ -24,9 +24,6 @@ sha3 = "0.10"
|
||||||
blake2 = "0.10.4"
|
blake2 = "0.10.4"
|
||||||
chrono = { version = "0.4.5", default-features = false, features = ["std"] }
|
chrono = { version = "0.4.5", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
rustc_version = "0.4"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# Build xmpp-parsers to make components instead of clients.
|
# Build xmpp-parsers to make components instead of clients.
|
||||||
component = []
|
component = []
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,6 @@ syntect = { version = "5", optional = true }
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = { version = "0.10", default-features = false, features = ["auto-color", "humantime"] }
|
env_logger = { version = "0.10", default-features = false, features = ["auto-color", "humantime"] }
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
rustc_version = "0.4"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["tls-native"]
|
default = ["tls-native"]
|
||||||
tls-rust = ["tokio-rustls", "webpki-roots"]
|
tls-rust = ["tokio-rustls", "webpki-roots"]
|
||||||
|
|
|
||||||
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -105,28 +105,19 @@ impl<S: AsyncRead + AsyncWrite + Unpin> Sink<Packet> for XMPPStream<S> {
|
||||||
Poll::Ready(Ok(()))
|
Poll::Ready(Ok(()))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn start_send(
|
fn start_send(mut self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error> {
|
||||||
#[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>,
|
|
||||||
item: Packet,
|
|
||||||
) -> Result<(), Self::Error> {
|
|
||||||
Pin::new(&mut self.stream)
|
Pin::new(&mut self.stream)
|
||||||
.start_send(item)
|
.start_send(item)
|
||||||
.map_err(|e| e.into())
|
.map_err(|e| e.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_flush(
|
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
|
||||||
#[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>,
|
|
||||||
cx: &mut Context,
|
|
||||||
) -> Poll<Result<(), Self::Error>> {
|
|
||||||
Pin::new(&mut self.stream)
|
Pin::new(&mut self.stream)
|
||||||
.poll_flush(cx)
|
.poll_flush(cx)
|
||||||
.map_err(|e| e.into())
|
.map_err(|e| e.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_close(
|
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
|
||||||
#[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>,
|
|
||||||
cx: &mut Context,
|
|
||||||
) -> Poll<Result<(), Self::Error>> {
|
|
||||||
Pin::new(&mut self.stream)
|
Pin::new(&mut self.stream)
|
||||||
.poll_close(cx)
|
.poll_close(cx)
|
||||||
.map_err(|e| e.into())
|
.map_err(|e| e.into())
|
||||||
|
|
@ -137,10 +128,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin> Sink<Packet> for XMPPStream<S> {
|
||||||
impl<S: AsyncRead + AsyncWrite + Unpin> Stream for XMPPStream<S> {
|
impl<S: AsyncRead + AsyncWrite + Unpin> Stream for XMPPStream<S> {
|
||||||
type Item = Result<Packet, crate::Error>;
|
type Item = Result<Packet, crate::Error>;
|
||||||
|
|
||||||
fn poll_next(
|
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
|
||||||
#[cfg_attr(rustc_least_1_46, allow(unused_mut))] mut self: Pin<&mut Self>,
|
|
||||||
cx: &mut Context,
|
|
||||||
) -> Poll<Option<Self::Item>> {
|
|
||||||
Pin::new(&mut self.stream)
|
Pin::new(&mut self.stream)
|
||||||
.poll_next(cx)
|
.poll_next(cx)
|
||||||
.map(|result| result.map(|result| result.map_err(|e| e.into())))
|
.map(|result| result.map(|result| result.map_err(|e| e.into())))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue