Skip to content

Commit

Permalink
Add Display impl for connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
bwidawsk authored and Drakulix committed Apr 18, 2024
1 parent 32aec87 commit 9208993
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/control/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ pub struct Info {
pub(crate) subpixel: SubPixel,
}

impl std::fmt::Display for Info {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}-{}", self.interface.as_str(), self.interface_id)
}
}

impl Info {
/// Returns the handle to this connector.
pub fn handle(&self) -> Handle {
Expand Down

0 comments on commit 9208993

Please sign in to comment.