Skip to content

Commit

Permalink
Merge pull request #22 from Tnze/main
Browse files Browse the repository at this point in the history
Implement std::fmt::Display for DeviceId on Linux
  • Loading branch information
alexmoon authored Oct 27, 2024
2 parents a9acce9 + 36a655c commit 4a754ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bluer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ mod error;
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct DeviceId(bluer::Address);

impl std::fmt::Display for DeviceId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(&self.0, f)
}
}

0 comments on commit 4a754ee

Please sign in to comment.