summaryrefslogtreecommitdiffstats
path: root/tokio/src/task
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/task')
-rw-r--r--tokio/src/task/local.rs10
-rw-r--r--tokio/src/task/spawn.rs2
2 files changed, 6 insertions, 6 deletions
diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs
index 3c409edf..a56453df 100644
--- a/tokio/src/task/local.rs
+++ b/tokio/src/task/local.rs
@@ -312,9 +312,9 @@ impl LocalSet {
/// use tokio::runtime::Runtime;
/// use tokio::task;
///
- /// let mut rt = Runtime::new().unwrap();
+ /// let rt = Runtime::new().unwrap();
/// let local = task::LocalSet::new();
- /// local.block_on(&mut rt, async {
+ /// local.block_on(&rt, async {
/// let join = task::spawn_local(async {
/// let blocking_result = task::block_in_place(|| {
/// // ...
@@ -329,9 +329,9 @@ impl LocalSet {
/// use tokio::runtime::Runtime;
/// use tokio::task;
///
- /// let mut rt = Runtime::new().unwrap();
+ /// let rt = Runtime::new().unwrap();
/// let local = task::LocalSet::new();
- /// local.block_on(&mut rt, async {
+ /// local.block_on(&rt, async {
/// let join = task::spawn_local(async {
/// let blocking_result = task::spawn_blocking(|| {
/// // ...
@@ -346,7 +346,7 @@ impl LocalSet {
/// [`Runtime::block_on`]: method@crate::runtime::Runtime::block_on
/// [in-place blocking]: fn@crate::task::block_in_place
/// [`spawn_blocking`]: fn@crate::task::spawn_blocking
- pub fn block_on<F>(&self, rt: &mut crate::runtime::Runtime, future: F) -> F::Output
+ pub fn block_on<F>(&self, rt: &crate::runtime::Runtime, future: F) -> F::Output
where
F: Future,
{
diff --git a/tokio/src/task/spawn.rs b/tokio/src/task/spawn.rs
index d6e77118..280e90ea 100644
--- a/tokio/src/task/spawn.rs
+++ b/tokio/src/task/spawn.rs
@@ -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
///