From 2309c27a2d1cb2af7d0feed1b0eb3addf8a45d98 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 12 Dec 2025 13:14:05 +0100 Subject: [PATCH] Replace ifdef with cfg! --- src/reader/reader.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/reader/reader.rs b/src/reader/reader.rs index 448c3631d..2ebd423b6 100644 --- a/src/reader/reader.rs +++ b/src/reader/reader.rs @@ -970,8 +970,7 @@ pub fn reader_init(will_restore_foreground_pgroup: bool) { TERMINAL_MODE_ON_STARTUP.get_or_init(|| terminal_mode_on_startup); } - #[cfg(not(test))] - assert!(AT_EXIT.get().is_none()); + assert!(cfg!(test) || AT_EXIT.get().is_none()); AT_EXIT.get_or_init(|| Box::new(move || reader_deinit(will_restore_foreground_pgroup))); // Set the mode used for program execution, initialized to the current mode.