Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokio 0.2.x: Update panic messages to include version #3460

Merged
merged 3 commits into from Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions tokio/src/io/driver/mod.rs
Expand Up @@ -200,8 +200,9 @@ impl Handle {
///
/// This function panics if there is no current reactor set.
pub(super) fn current() -> Self {
context::io_handle()
.expect("there is no reactor running, must be called from the context of Tokio runtime")
context::io_handle().expect(
"there is no reactor running, must be called from the context of a Tokio 0.2.x runtime",
)
}

/// Forces a reactor blocked in a call to `turn` to wakeup, or otherwise
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/handle.rs
Expand Up @@ -115,7 +115,7 @@ impl Handle {
/// # }
/// ```
pub fn current() -> Self {
context::current().expect("not currently running on the Tokio runtime.")
context::current().expect("not currently running on a Tokio 0.2.x runtime.")
}

/// Returns a Handle view over the currently running Runtime
Expand Down
1 change: 0 additions & 1 deletion tokio/src/sync/broadcast.rs
Expand Up @@ -957,7 +957,6 @@ where

#[cfg(feature = "stream")]
#[doc(hidden)]
#[deprecated(since = "0.2.21", note = "use `into_stream()`")]
Darksonn marked this conversation as resolved.
Show resolved Hide resolved
impl<T> crate::stream::Stream for Receiver<T>
where
T: Clone,
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/task/spawn.rs
Expand Up @@ -128,7 +128,7 @@ doc_rt_core! {
T::Output: Send + 'static,
{
let spawn_handle = runtime::context::spawn_handle()
.expect("must be called from the context of Tokio runtime configured with either `basic_scheduler` or `threaded_scheduler`");
.expect("must be called from the context of a Tokio 0.2.x runtime configured with either `basic_scheduler` or `threaded_scheduler`");
let task = crate::util::trace::task(task, "task");
spawn_handle.spawn(task)
}
Expand Down
5 changes: 3 additions & 2 deletions tokio/src/time/driver/handle.rs
Expand Up @@ -21,8 +21,9 @@ impl Handle {
///
/// This function panics if there is no current timer set.
pub(crate) fn current() -> Self {
context::time_handle()
.expect("there is no timer running, must be called from the context of Tokio runtime")
context::time_handle().expect(
"there is no timer running, must be called from the context of a Tokio 0.2.x runtime",
)
}

/// Tries to return a strong ref to the inner
Expand Down