From e2fe02d08a33c9e3d5d96d8c65e02814c5a4ad4d Mon Sep 17 00:00:00 2001 From: Josh Simmons Date: Thu, 22 Aug 2024 19:21:06 +0200 Subject: [PATCH] narcissus-font: Add `as_u32` to `TouchedGlyphInstance` --- engine/narcissus-font/src/cache.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/narcissus-font/src/cache.rs b/engine/narcissus-font/src/cache.rs index e96b60d..7b62ba6 100644 --- a/engine/narcissus-font/src/cache.rs +++ b/engine/narcissus-font/src/cache.rs @@ -19,6 +19,13 @@ struct GlyphKey { #[repr(transparent)] pub struct TouchedGlyphIndex(u32); +impl TouchedGlyphIndex { + #[must_use] + pub fn as_u32(self) -> u32 { + self.0 + } +} + /// Holds data required to draw a glyph from the glyph atlas. #[derive(Clone, Copy, Default)] #[repr(C)] -- 2.49.0