From 1448c5bfa5d0977e54670bb8c640ba186bb13167 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 18 Sep 2024 20:30:14 +0200 Subject: Implement some `From` traits for `text_input::Id` --- core/src/window/id.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'core/src/window') 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) + } +} -- cgit