diff options
author | 2024-09-18 20:40:17 +0200 | |
---|---|---|
committer | 2024-09-18 20:40:17 +0200 | |
commit | 035d4e37d5a1c818aa134b8c99b31d635a7b8996 (patch) | |
tree | 50c1cb5fac6bee8738fe69e59ed355150b701cf1 /core | |
parent | f89744283167a1961fcff512ad48b0eb9b8fcaef (diff) | |
parent | 1448c5bfa5d0977e54670bb8c640ba186bb13167 (diff) | |
download | iced-035d4e37d5a1c818aa134b8c99b31d635a7b8996.tar.gz iced-035d4e37d5a1c818aa134b8c99b31d635a7b8996.tar.bz2 iced-035d4e37d5a1c818aa134b8c99b31d635a7b8996.zip |
Merge pull request #2582 from iced-rs/from-trait-for-text-input-id
Implement some `From` traits for `text_input::Id`
Diffstat (limited to 'core')
-rw-r--r-- | core/src/window/id.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/window/id.rs b/core/src/window/id.rs index 1a75fa27..5d5a817e 100644 --- a/core/src/window/id.rs +++ b/core/src/window/id.rs @@ -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) + } +} |