Skip to content

Commit 622dc44

Browse files
committed
Future-proof spawn errors
1 parent ceab906 commit 622dc44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

futures-core/src/executor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub trait Executor {
1616
///
1717
/// The executor may be unable to spawn tasks, either because it has
1818
/// been shut down or is resource-constrained.
19-
fn spawn_obj(&mut self, task: TaskObj) -> Result<(), SpawnError<TaskObj>>;
19+
fn spawn_obj(&mut self, task: TaskObj) -> Result<(), SpawnObjError>;
2020

2121
/// Determine whether the executor is able to spawn new tasks.
2222
///
@@ -52,10 +52,10 @@ impl SpawnErrorKind {
5252

5353
/// The result of a failed spawn
5454
#[derive(Debug)]
55-
pub struct SpawnError<T> {
55+
pub struct SpawnObjError {
5656
/// The kind of error
5757
pub kind: SpawnErrorKind,
5858

5959
/// The task for which spawning was attempted
60-
pub task: T,
60+
pub task: TaskObj,
6161
}

0 commit comments

Comments
 (0)