Skip to content

Commit

Permalink
Frame: impl Display
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed Apr 2, 2024
1 parent b09b359 commit 47dd748
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/can/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Frame {
}
}

impl fmt::Debug for Frame {
impl fmt::Display for Frame {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Frame")
.field("bus", &self.bus)
Expand All @@ -117,6 +117,12 @@ impl fmt::Debug for Frame {
}
}

impl fmt::Debug for Frame {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(self, f)
}
}

/// Trait for a Blocking CAN Adapter
pub trait CanAdapter {
fn send(&mut self, frames: &mut VecDeque<crate::can::Frame>) -> crate::Result<()>;
Expand Down

0 comments on commit 47dd748

Please sign in to comment.