they should add a cancellation safety lint

This commit is contained in:
Toshit Chawda 2024-09-06 20:47:16 -07:00
parent 9d1604cc3e
commit 9d697416d9
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
3 changed files with 62 additions and 43 deletions

View file

@ -96,6 +96,8 @@ pub enum WispError {
MuxMessageFailedToRecv,
/// Multiplexor task ended.
MuxTaskEnded,
/// Multiplexor task already started.
MuxTaskStarted,
}
impl From<std::str::Utf8Error> for WispError {
@ -150,6 +152,7 @@ impl std::fmt::Display for WispError {
Self::MuxMessageFailedToSend => write!(f, "Failed to send multiplexor message"),
Self::MuxMessageFailedToRecv => write!(f, "Failed to receive multiplexor message"),
Self::MuxTaskEnded => write!(f, "Multiplexor task ended"),
Self::MuxTaskStarted => write!(f, "Multiplexor task already started"),
}
}
}