Implement some From traits for text_input::Id
This commit is contained in:
parent
f897442831
commit
1448c5bfa5
5 changed files with 38 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
|
||||
use std::sync::atomic::{self, AtomicU64};
|
||||
|
||||
/// The id of the window.
|
||||
|
|
@ -14,3 +14,9 @@ impl Id {
|
|||
Id(COUNT.fetch_add(1, atomic::Ordering::Relaxed))
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Id {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.0.fmt(f)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue