diff options
Diffstat (limited to 'src/task/spawn.rs')
-rw-r--r-- | src/task/spawn.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/task/spawn.rs b/src/task/spawn.rs index d6e7711..77acb57 100644 --- a/src/task/spawn.rs +++ b/src/task/spawn.rs @@ -3,7 +3,7 @@ use crate::task::JoinHandle; use std::future::Future; -doc_rt_core! { +cfg_rt! { /// Spawns a new asynchronous task, returning a /// [`JoinHandle`](super::JoinHandle) for it. /// @@ -18,7 +18,7 @@ doc_rt_core! { /// /// This function must be called from the context of a Tokio runtime. Tasks running on /// the Tokio runtime are always inside its context, but you can also enter the context - /// using the [`Handle::enter`](crate::runtime::Handle::enter()) method. + /// using the [`Runtime::enter`](crate::runtime::Runtime::enter()) method. /// /// # Examples /// @@ -37,7 +37,7 @@ doc_rt_core! { /// /// #[tokio::main] /// async fn main() -> io::Result<()> { - /// let mut listener = TcpListener::bind("127.0.0.1:8080").await?; + /// let listener = TcpListener::bind("127.0.0.1:8080").await?; /// /// loop { /// let (socket, _) = listener.accept().await?; |