From 38ff0b79bda8182a81dc072d94b889ebb1c9a4ae Mon Sep 17 00:00:00 2001 From: auronandace Date: Sat, 7 Mar 2026 15:51:24 +0000 Subject: [PATCH] eliminate a useless comparison on aarch64 and riscv64 --- src/header/locale/data.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/header/locale/data.rs b/src/header/locale/data.rs index 92513600af..db81a0ea6e 100644 --- a/src/header/locale/data.rs +++ b/src/header/locale/data.rs @@ -362,6 +362,8 @@ impl PosixLocaleDef { /// parse e.g. `-1` -> None, `1` -> Some(1) fn parse_int(val: &str) -> Option { let r = val.trim().parse::().ok(); + // c_char is u8 on aarch64 and riscv64 so comparison is useless + #[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))] if r.is_some_and(|i| i < 0) { return None; }