From ea83016317403e3e4286556827bdabc786bdfb73 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Wed, 11 Dec 2024 19:30:01 +0100 Subject: [PATCH] Extract features Needed to infer the type if none is used --- src/builtins/status.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/builtins/status.rs b/src/builtins/status.rs index 40df7ad86..2412fe7cc 100644 --- a/src/builtins/status.rs +++ b/src/builtins/status.rs @@ -447,16 +447,15 @@ pub fn status(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> O streams.out.append(L!("Profile: ")); streams.out.appendln(profile); streams.out.append(L!("Features: ")); - streams.out.appendln(str2wcstring( - [ - #[cfg(gettext)] - "gettext", - #[cfg(feature = "installable")] - "installable", - ] - .join(" ") - .as_bytes(), - )); + let features: &[&str] = &[ + #[cfg(gettext)] + "gettext", + #[cfg(feature = "installable")] + "installable", + ]; + streams + .out + .appendln(str2wcstring(features.join(" ").as_bytes())); streams.out.appendln(""); return STATUS_CMD_OK; }