From 9fe2604154862a8496f094acb257b124c5c0cbfe Mon Sep 17 00:00:00 2001 From: Dexoron Date: Mon, 23 Feb 2026 14:02:32 +0800 Subject: [PATCH] Custom output directory via `build.target` --- src/core/config.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/config.rs b/src/core/config.rs index 53cf4a4..f117b8a 100644 --- a/src/core/config.rs +++ b/src/core/config.rs @@ -217,10 +217,10 @@ fn format_toml(value: &Value) -> Result { out.push_str(&format!("language = \"{language}\"\n")); out.push_str(&format!("standard = \"{standard}\"\n")); out.push_str(&format!("compiler = \"{compiler}\"\n")); - if let Some(target) = build.get("target").and_then(|v| v.as_str()) { - if !target.trim().is_empty() { - out.push_str(&format!("target = \"{target}\"\n")); - } + if let Some(target) = build.get("target").and_then(|v| v.as_str()) + && !target.trim().is_empty() + { + out.push_str(&format!("target = \"{target}\"\n")); } if let Some(cflags) = build.get("cflags") { out.push_str(&format!("cflags = {}\n", format_string_array(cflags)));