Mercurial > crates > systemd-socket
diff src/error.rs @ 21:f6334887e3c8
Support `tokio` 1.0
Tokio 1.0 was already out for a while and this adds the missing support
for it. Deprecation of 0.2 and 0.3 is planned but they are staying for
now.
author | Martin Habovstiak <martin.habovstiak@gmail.com> |
---|---|
date | Sat, 13 Jul 2024 15:09:13 +0200 |
parents | bc76507dd878 |
children | 1941e9d9819c |
line wrap: on
line diff
--- a/src/error.rs Sat Jul 13 14:19:29 2024 +0200 +++ b/src/error.rs Sat Jul 13 15:09:13 2024 +0200 @@ -81,7 +81,7 @@ /// /// As opposed to `std` and `async_std` sockets, tokio sockets can fail to convert. /// This error type expresses this possibility. -#[cfg(any(feature = "tokio_0_2", feature = "tokio_0_3"))] +#[cfg(any(feature = "tokio", feature = "tokio_0_2", feature = "tokio_0_3"))] #[derive(Debug, Error)] #[error(transparent)] pub enum TokioBindError { @@ -96,7 +96,7 @@ /// As opposed to `std` and `async_std` sockets, tokio sockets can fail to convert. /// This error type encapsulates conversion error together with additional information so that it /// can be displayed nicely. The encapsulation also allows for future-proofing. -#[cfg(any(feature = "tokio_0_2", feature = "tokio_0_3"))] +#[cfg(any(feature = "tokio", feature = "tokio_0_2", feature = "tokio_0_3"))] #[derive(Debug, Error)] #[error("failed to convert std socket {addr} into tokio socket")] pub struct TokioConversionError {