From 3bcbe0ae6e1bb80b402dd282930d96b9d60926e4 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Wed, 21 Feb 2024 11:20:45 +0100 Subject: [PATCH] use usize max as the default font handle (to ensure it always stays invalid) --- hui/src/text/font.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hui/src/text/font.rs b/hui/src/text/font.rs index 402edd6..093f408 100644 --- a/hui/src/text/font.rs +++ b/hui/src/text/font.rs @@ -6,10 +6,9 @@ pub struct FontHandle(pub(crate) usize); #[cfg(feature = "builtin_font")] pub const BUILTIN_FONT: FontHandle = FontHandle(0); - pub(crate) const DEFAULT_FONT: FontHandle = { #[cfg(feature = "builtin_font")] { BUILTIN_FONT } - #[cfg(not(feature = "builtin_font"))] { FontHandle(0) } + #[cfg(not(feature = "builtin_font"))] { FontHandle(usize::MAX) } }; #[cfg(feature = "builtin_font")]