From 46ff5ff067eab4b2445433d2e1021c06ffdda229 Mon Sep 17 00:00:00 2001 From: Charles Celerier Date: Wed, 10 Jul 2024 03:43:15 +0000 Subject: [PATCH] Move comment for Windows-only constant into the match arm section --- library/test/src/test_result.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/library/test/src/test_result.rs b/library/test/src/test_result.rs index c4935f273919e..6f2105795ca26 100644 --- a/library/test/src/test_result.rs +++ b/library/test/src/test_result.rs @@ -16,11 +16,6 @@ pub use self::TestResult::*; // it means. pub const TR_OK: i32 = 50; -// On Windows we use __fastfail to abort, which is documented to use this -// exception code. -#[cfg(windows)] -const STATUS_ABORTED: i32 = 0xC0000409u32 as i32; - #[derive(Debug, Clone, PartialEq)] pub enum TestResult { TrOk, @@ -95,8 +90,10 @@ pub fn get_result_from_exit_code( ) -> TestResult { let result = match status.code() { Some(TR_OK) => TestResult::TrOk, + // On Windows we use __fastfail to abort, which is documented to use this + // exception code. #[cfg(windows)] - Some(STATUS_ABORTED) => TestResult::TrFailed, + Some(0xC0000409) => TestResult::TrFailed, #[cfg(unix)] None => match status.signal() { Some(libc::SIGABRT) => TestResult::TrFailed,