From 39046ad50e6c8e8a09f2625e466d33750a09e8a5 Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Fri, 9 Jan 2026 15:03:56 -0800 Subject: [PATCH] Bugfix: should be checked against 0x10 or 0x0F, not 0x80 --- components/plurals/src/provider.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/plurals/src/provider.rs b/components/plurals/src/provider.rs index d9b9f6ff6c0..149dd5d619a 100644 --- a/components/plurals/src/provider.rs +++ b/components/plurals/src/provider.rs @@ -637,7 +637,7 @@ pub struct FourBitMetadata(u8); impl FourBitMetadata { /// Creates a [`FourBitMetadata`] if the given value fits in 4 bits. pub fn try_from_byte(byte: u8) -> Option { - if byte < 0x80 { + if byte <= 0x0F { Some(Self(byte)) } else { None @@ -645,12 +645,12 @@ impl FourBitMetadata { } /// Creates a [`FourBitMetadata`] with a zero value. - pub fn zero() -> Self { + pub const fn zero() -> Self { Self(0) } /// Gets the value out of a [`FourBitMetadata`]. - pub fn get(self) -> u8 { + pub const fn get(self) -> u8 { self.0 } }