mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
committed by
Carl Lerche
parent
516251052d
commit
0651f09427
@@ -22,7 +22,7 @@ pub struct EnterError {
|
||||
impl fmt::Debug for EnterError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("EnterError")
|
||||
.field("reason", &self.description())
|
||||
.field("reason", &format!("{}", self))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,12 +39,11 @@ impl SpawnError {
|
||||
|
||||
impl fmt::Display for SpawnError {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(fmt, "{}", self.description())
|
||||
write!(
|
||||
fmt,
|
||||
"attempted to spawn task while the executor is at capacity or shut down"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl Error for SpawnError {
|
||||
fn description(&self) -> &str {
|
||||
"attempted to spawn task while the executor is at capacity or shut down"
|
||||
}
|
||||
}
|
||||
impl Error for SpawnError {}
|
||||
|
||||
Reference in New Issue
Block a user