diff --git a/crates/tests/component/src/bindings.rs b/crates/tests/component/src/bindings.rs index 9406515091..23d0d5c8f7 100644 --- a/crates/tests/component/src/bindings.rs +++ b/crates/tests/component/src/bindings.rs @@ -275,22 +275,17 @@ impl ::windows_core::RuntimeName for Class { unsafe impl ::core::marker::Send for Class {} unsafe impl ::core::marker::Sync for Class {} #[repr(transparent)] -#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] +#[derive( + ::core::cmp::PartialEq, + ::core::cmp::Eq, + ::core::marker::Copy, + ::core::clone::Clone, + ::core::default::Default, +)] pub struct Flags(pub u32); impl Flags { pub const Ok: Self = Self(0u32); } -impl ::core::marker::Copy for Flags {} -impl ::core::clone::Clone for Flags { - fn clone(&self) -> Self { - *self - } -} -impl ::core::default::Default for Flags { - fn default() -> Self { - Self(0) - } -} impl ::windows_core::TypeKind for Flags { type TypeKind = ::windows_core::CopyType; } diff --git a/crates/tests/component_client/src/bindings.rs b/crates/tests/component_client/src/bindings.rs index 84ab6f89bb..b3a0e03596 100644 --- a/crates/tests/component_client/src/bindings.rs +++ b/crates/tests/component_client/src/bindings.rs @@ -243,22 +243,17 @@ impl ::windows_core::RuntimeName for Class { unsafe impl ::core::marker::Send for Class {} unsafe impl ::core::marker::Sync for Class {} #[repr(transparent)] -#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] +#[derive( + ::core::cmp::PartialEq, + ::core::cmp::Eq, + ::core::marker::Copy, + ::core::clone::Clone, + ::core::default::Default, +)] pub struct Flags(pub u32); impl Flags { pub const Ok: Self = Self(0u32); } -impl ::core::marker::Copy for Flags {} -impl ::core::clone::Clone for Flags { - fn clone(&self) -> Self { - *self - } -} -impl ::core::default::Default for Flags { - fn default() -> Self { - Self(0) - } -} impl ::windows_core::TypeKind for Flags { type TypeKind = ::windows_core::CopyType; } diff --git a/crates/tests/standalone/src/b_calendar.rs b/crates/tests/standalone/src/b_calendar.rs index af0cc562eb..5e25216d2a 100644 --- a/crates/tests/standalone/src/b_calendar.rs +++ b/crates/tests/standalone/src/b_calendar.rs @@ -1319,7 +1319,13 @@ impl ::core::default::Default for DateTime { } } #[repr(transparent)] -#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] +#[derive( + ::core::cmp::PartialEq, + ::core::cmp::Eq, + ::core::marker::Copy, + ::core::clone::Clone, + ::core::default::Default, +)] pub struct DayOfWeek(pub i32); impl DayOfWeek { pub const Sunday: Self = Self(0i32); @@ -1330,17 +1336,6 @@ impl DayOfWeek { pub const Friday: Self = Self(5i32); pub const Saturday: Self = Self(6i32); } -impl ::core::marker::Copy for DayOfWeek {} -impl ::core::clone::Clone for DayOfWeek { - fn clone(&self) -> Self { - *self - } -} -impl ::core::default::Default for DayOfWeek { - fn default() -> Self { - Self(0) - } -} impl ::windows_core::TypeKind for DayOfWeek { type TypeKind = ::windows_core::CopyType; } diff --git a/crates/tests/standalone/src/b_win_enumerator.rs b/crates/tests/standalone/src/b_win_enumerator.rs index e7688d7116..09ddd5d9e8 100644 --- a/crates/tests/standalone/src/b_win_enumerator.rs +++ b/crates/tests/standalone/src/b_win_enumerator.rs @@ -8,19 +8,14 @@ clippy::all )] #[repr(transparent)] -#[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] +#[derive( + ::core::cmp::PartialEq, + ::core::cmp::Eq, + ::core::marker::Copy, + ::core::clone::Clone, + ::core::default::Default, +)] pub struct WAIT_EVENT(pub u32); -impl ::core::marker::Copy for WAIT_EVENT {} -impl ::core::clone::Clone for WAIT_EVENT { - fn clone(&self) -> Self { - *self - } -} -impl ::core::default::Default for WAIT_EVENT { - fn default() -> Self { - Self(0) - } -} impl ::windows_core::TypeKind for WAIT_EVENT { type TypeKind = ::windows_core::CopyType; }