Change BusErrorCause's Display impl to use Self

This commit is contained in:
pjht 2023-01-28 08:18:37 -06:00
parent c39a562b1d
commit dc94ae8ac8
Signed by: pjht
GPG Key ID: E911DEB42C25F8E1

View File

@ -36,11 +36,11 @@ pub enum BusErrorCause {
impl Display for BusErrorCause {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
BusErrorCause::ReadingByte => f.write_str("reading byte from"),
BusErrorCause::ReadingWord => f.write_str("reading word from"),
BusErrorCause::WritingByte => f.write_str("writing byte to"),
BusErrorCause::WritingWord => f.write_str("writing word to"),
BusErrorCause::ReadingInstruction => f.write_str("reading instruction at"),
Self::ReadingByte => f.write_str("reading byte from"),
Self::ReadingWord => f.write_str("reading word from"),
Self::WritingByte => f.write_str("writing byte to"),
Self::WritingWord => f.write_str("writing word to"),
Self::ReadingInstruction => f.write_str("reading instruction at"),
}
}
}