diff --git a/agnostic/Cargo.toml b/agnostic/Cargo.toml index f9ca48f..86af38a 100644 --- a/agnostic/Cargo.toml +++ b/agnostic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agnostic" -version = "0.3.6" +version = "0.3.7" edition.workspace = true license.workspace = true rust-version.workspace = true diff --git a/agnostic/src/async_std/net.rs b/agnostic/src/async_std/net.rs index d95c0ca..6a9cdde 100644 --- a/agnostic/src/async_std/net.rs +++ b/agnostic/src/async_std/net.rs @@ -7,8 +7,6 @@ use std::{ use ::async_std::net::{TcpListener, TcpStream, UdpSocket}; use futures_util::FutureExt; -#[cfg(feature = "compat")] -use tokio_util::compat::FuturesAsyncWriteCompatExt; use crate::net::{Net, TcpStreamOwnedReadHalf, TcpStreamOwnedWriteHalf, ToSocketAddrs}; diff --git a/agnostic/src/lib.rs b/agnostic/src/lib.rs index 9683b57..bb635aa 100644 --- a/agnostic/src/lib.rs +++ b/agnostic/src/lib.rs @@ -5,8 +5,8 @@ #![allow(clippy::needless_return)] #![allow(unreachable_code)] -#[cfg(all(feature = "compat", not(feature = "net")))] -compile_error!("`compat` feature is enabled, but `net` feature is disabled, `compact` feature must only be enabled with `net` feature"); +#[cfg(all(feature = "tokio-compat", not(feature = "net")))] +compile_error!("`tokio-compat` feature is enabled, but `net` feature is disabled, `compact` feature must only be enabled with `net` feature"); #[macro_use] mod macros; diff --git a/agnostic/src/smol/net.rs b/agnostic/src/smol/net.rs index 82148d5..402b4a3 100644 --- a/agnostic/src/smol/net.rs +++ b/agnostic/src/smol/net.rs @@ -7,8 +7,6 @@ use std::{ use futures_util::FutureExt; use smol::net::{TcpListener, TcpStream, UdpSocket}; -#[cfg(feature = "compat")] -use tokio_util::compat::FuturesAsyncWriteCompatExt; use crate::net::{Net, TcpStreamOwnedReadHalf, TcpStreamOwnedWriteHalf, ToSocketAddrs}; diff --git a/lite/Cargo.toml b/lite/Cargo.toml index 710ee0c..69d738f 100644 --- a/lite/Cargo.toml +++ b/lite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agnostic-lite" -version = "0.3.15" +version = "0.3.16" edition.workspace = true license.workspace = true rust-version.workspace = true diff --git a/lite/src/time/delay.rs b/lite/src/time/delay.rs index aa0e572..15f10b5 100644 --- a/lite/src/time/delay.rs +++ b/lite/src/time/delay.rs @@ -24,6 +24,7 @@ fn _assert1(_: Box>) {} fn _assert2(_: Box>) {} /// Simlilar to Go's `time.AfterFunc`, but does not spawn a new thread. +/// /// If you want the future to run in its own thread, you should use /// [`RuntimeLite::spawn_after`](crate::RuntimeLite::spawn_after) instead. pub trait AsyncDelay: Future> + Send