Skip to content

Commit d2185fc

Browse files
committed
better debug messages
Signed-off-by: Connor Tsui <[email protected]>
1 parent f95517d commit d2185fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/std/src/sync/oneshot.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,16 +399,16 @@ pub enum RecvTimeoutError<T> {
399399
#[unstable(feature = "oneshot_channel", issue = "143674")]
400400
impl<T> fmt::Debug for TryRecvError<T> {
401401
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
402-
"TryRecvError(..)".fmt(f)
402+
"oneshot::TryRecvError(..)".fmt(f)
403403
}
404404
}
405405

406406
#[unstable(feature = "oneshot_channel", issue = "143674")]
407407
impl<T> fmt::Display for TryRecvError<T> {
408408
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
409409
match *self {
410-
TryRecvError::Empty(..) => "receiving on an empty channel".fmt(f),
411-
TryRecvError::Disconnected => "receiving on a closed channel".fmt(f),
410+
TryRecvError::Empty(..) => "receiving on an empty oneshot channel".fmt(f),
411+
TryRecvError::Disconnected => "receiving on a closed oneshot channel".fmt(f),
412412
}
413413
}
414414
}
@@ -433,16 +433,16 @@ impl<T> From<RecvError> for TryRecvError<T> {
433433
#[unstable(feature = "oneshot_channel", issue = "143674")]
434434
impl<T> fmt::Debug for RecvTimeoutError<T> {
435435
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
436-
"RecvTimeoutError(..)".fmt(f)
436+
"oneshot::RecvTimeoutError(..)".fmt(f)
437437
}
438438
}
439439

440440
#[unstable(feature = "oneshot_channel", issue = "143674")]
441441
impl<T> fmt::Display for RecvTimeoutError<T> {
442442
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
443443
match *self {
444-
RecvTimeoutError::Timeout(..) => "timed out waiting on channel".fmt(f),
445-
RecvTimeoutError::Disconnected => "receiving on a closed channel".fmt(f),
444+
RecvTimeoutError::Timeout(..) => "timed out waiting on oneshot channel".fmt(f),
445+
RecvTimeoutError::Disconnected => "receiving on a closed oneshot channel".fmt(f),
446446
}
447447
}
448448
}

0 commit comments

Comments
 (0)