From 450b664ad80c42ac452407008aeca2a8140c4f1e Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Tue, 10 Feb 2026 14:45:57 +0100 Subject: [PATCH] term/editor: Use `cfg`-attribute instead of macro This might result in smaller binaries and is just as readable. --- crates/radicle-term/src/editor.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/radicle-term/src/editor.rs b/crates/radicle-term/src/editor.rs index 29b604fe..8b4085b4 100644 --- a/crates/radicle-term/src/editor.rs +++ b/crates/radicle-term/src/editor.rs @@ -223,7 +223,8 @@ fn default_editor() -> Option { // On macOS, `nano` is installed by default and it's what most users are used to // in the terminal. - if cfg!(target_os = "macos") && exists("nano") { + #[cfg(target_os = "macos")] + if exists("nano") { return Some("nano".into()); } // If all else fails, we try `vi`. It's usually installed on most unix-based systems.