From c4f420cdc23da7ad2c7cc3959549ff9639274b1c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 5 May 2026 19:36:46 +0200 Subject: [PATCH 1/2] Fix mislabeled fields in WinApiSystemInfo Debug impl The Debug formatter labeled wProcessorLevel as "wAllocationGranularity" and wProcessorRevision as "wAllocationRevision", a copy/paste mistake. --- src/platform/windows.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/windows.rs b/src/platform/windows.rs index bab889c..4f9f07b 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -273,8 +273,8 @@ impl Debug for WinApiSystemInfo { .field("dwNumberOfProcessors", &self.0.dwNumberOfProcessors) .field("dwProcessorType", &self.0.dwProcessorType) .field("dwAllocationGranularity", &self.0.dwAllocationGranularity) - .field("wAllocationGranularity", &self.0.wProcessorLevel) - .field("wAllocationRevision", &self.0.wProcessorRevision) + .field("wProcessorLevel", &self.0.wProcessorLevel) + .field("wProcessorRevision", &self.0.wProcessorRevision) .finish() } } From 3a0739eac556ca0e25e07748e5eba62112803c6f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 5 May 2026 19:36:50 +0200 Subject: [PATCH 2/2] Add map_processor passthrough tests for more architectures Cover riscv32, powerpc, powerpc64le, s390x, sparc64, loongarch64, and mips64 to lock in the passthrough behavior for architectures not in the explicit mapping table. --- src/lib_impl.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib_impl.rs b/src/lib_impl.rs index 9382e19..ed018f8 100644 --- a/src/lib_impl.rs +++ b/src/lib_impl.rs @@ -150,7 +150,14 @@ fn test_map_processor_mappings() { assert_eq!(map_processor("i686"), "i686"); // Unknown/passthrough architectures + assert_eq!(map_processor("riscv32"), "riscv32"); assert_eq!(map_processor("riscv64"), "riscv64"); + assert_eq!(map_processor("powerpc"), "powerpc"); assert_eq!(map_processor("powerpc64"), "powerpc64"); + assert_eq!(map_processor("powerpc64le"), "powerpc64le"); + assert_eq!(map_processor("s390x"), "s390x"); + assert_eq!(map_processor("sparc64"), "sparc64"); + assert_eq!(map_processor("loongarch64"), "loongarch64"); + assert_eq!(map_processor("mips64"), "mips64"); assert_eq!(map_processor("unknown"), "unknown"); }