Skip to content

Commit cf8bbc2

Browse files
committed
Fix imports
1 parent 0bc98e6 commit cf8bbc2

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

tokio-util/src/task/join_map.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use hashbrown::hash_map::RawEntryMut;
22
use hashbrown::HashMap;
33
use std::borrow::Borrow;
44
use std::collections::hash_map::RandomState;
5+
use std::fmt;
56
use std::future::Future;
67
use std::hash::{BuildHasher, Hash, Hasher};
78
use std::marker::PhantomData;
8-
use std::{fmt, io};
99
use tokio::runtime::Handle;
1010
use tokio::task::{AbortHandle, Id, JoinError, JoinSet, LocalSet};
1111

@@ -932,7 +932,7 @@ where
932932
///
933933
/// [`join_next`]: JoinMap::join_next
934934
#[track_caller]
935-
pub fn spawn<F>(self, key: K, task: F) -> io::Result<()>
935+
pub fn spawn<F>(self, key: K, task: F) -> std::io::Result<()>
936936
where
937937
F: Future<Output = V>,
938938
F: Send + 'static,
@@ -959,7 +959,7 @@ where
959959
///
960960
/// [`join_next`]: JoinMap::join_next
961961
#[track_caller]
962-
pub fn spawn_on<F>(&mut self, key: K, task: F, handle: &Handle) -> io::Result<()>
962+
pub fn spawn_on<F>(&mut self, key: K, task: F, handle: &Handle) -> std::io::Result<()>
963963
where
964964
F: Future<Output = V>,
965965
F: Send + 'static,
@@ -995,7 +995,7 @@ where
995995
///
996996
/// [`join_next`]: JoinMap::join_next
997997
#[track_caller]
998-
pub fn spawn_blocking<F>(&mut self, key: K, f: F) -> io::Result<()>
998+
pub fn spawn_blocking<F>(&mut self, key: K, f: F) -> std::io::Result<()>
999999
where
10001000
F: FnOnce() -> V,
10011001
F: Send + 'static,
@@ -1027,7 +1027,7 @@ where
10271027
///
10281028
/// [`join_next`]: JoinMap::join_next
10291029
#[track_caller]
1030-
pub fn spawn_blocking_on<F>(&mut self, key: K, f: F, handle: &Handle) -> io::Result<()>
1030+
pub fn spawn_blocking_on<F>(&mut self, key: K, f: F, handle: &Handle) -> std::io::Result<()>
10311031
where
10321032
F: FnOnce() -> V,
10331033
F: Send + 'static,
@@ -1059,7 +1059,7 @@ where
10591059
/// [`LocalSet`]: tokio::task::LocalSet
10601060
/// [`join_next`]: JoinMap::join_next
10611061
#[track_caller]
1062-
pub fn spawn_local<F>(&mut self, key: K, task: F) -> io::Result<()>
1062+
pub fn spawn_local<F>(&mut self, key: K, task: F) -> std::io::Result<()>
10631063
where
10641064
F: Future<Output = V>,
10651065
F: 'static,
@@ -1086,7 +1086,7 @@ where
10861086
/// [`LocalSet`]: tokio::task::LocalSet
10871087
/// [`join_next`]: JoinMap::join_next
10881088
#[track_caller]
1089-
pub fn spawn_local_on<F>(&mut self, key: K, task: F, local_set: &LocalSet) -> io::Result<()>
1089+
pub fn spawn_local_on<F>(&mut self, key: K, task: F, local_set: &LocalSet) -> std::io::Result<()>
10901090
where
10911091
F: Future<Output = V>,
10921092
F: 'static,

tokio-util/src/task/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ pub use spawn_pinned::LocalPoolHandle;
77

88
#[cfg(tokio_unstable)]
99
#[cfg_attr(docsrs, doc(cfg(all(tokio_unstable, feature = "rt"))))]
10-
pub use join_map::{Builder as JoinMapBuilder, JoinMap, JoinMapKeys};
10+
pub use join_map::{JoinMap, JoinMapKeys};
11+
12+
#[cfg(tokio_unstable)]
13+
#[cfg_attr(docsrs, doc(cfg(all(tokio_unstable, feature = "rt"))))]
14+
pub use join_map::Builder as JoinMapBuilder;
1115

1216
pub mod task_tracker;
1317
pub use task_tracker::TaskTracker;

0 commit comments

Comments
 (0)