mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
chore: more concise Debug output for WindowId
This commit is contained in:
@@ -67,7 +67,7 @@ impl Drop for Window {
|
||||
///
|
||||
/// Whenever you receive an event specific to a window, this event contains a `WindowId` which you
|
||||
/// can then compare to the ids of your windows.
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct WindowId(pub(crate) platform_impl::WindowId);
|
||||
|
||||
impl WindowId {
|
||||
@@ -86,6 +86,12 @@ impl WindowId {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for WindowId {
|
||||
fn fmt(&self, fmtr: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.0.fmt(fmtr)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<WindowId> for u64 {
|
||||
fn from(window_id: WindowId) -> Self {
|
||||
window_id.0.into()
|
||||
|
||||
Reference in New Issue
Block a user