From 628b3d291e169efeff35f412079e7f15e24583e7 Mon Sep 17 00:00:00 2001 From: Rua Date: Sun, 8 Jan 2023 03:38:28 +0100 Subject: [PATCH] `impl From for u32` (#2125) --- vulkano/src/image/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vulkano/src/image/mod.rs b/vulkano/src/image/mod.rs index 5b4b383ad7..07e23065aa 100644 --- a/vulkano/src/image/mod.rs +++ b/vulkano/src/image/mod.rs @@ -287,6 +287,13 @@ vulkan_bitflags_enum! { SAMPLE_64, Sample64 = TYPE_64, } +impl From for u32 { + #[inline] + fn from(value: SampleCount) -> Self { + value as u32 + } +} + impl TryFrom for SampleCount { type Error = ();