Skip to content

Commit

Permalink
task: update JoinHandle panic message (#3727)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darksonn authored Apr 25, 2021
1 parent 0ba1e3c commit 73466f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/runtime/task/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ impl<T: Future> CoreStage<T> {
// Safety:: the caller ensures mutal exclusion to the field.
match mem::replace(unsafe { &mut *ptr }, Stage::Consumed) {
Stage::Finished(output) => output,
_ => panic!("unexpected task state"),
_ => panic!("JoinHandle polled after completion"),
}
})
}
Expand Down

0 comments on commit 73466f4

Please sign in to comment.