From ab6be7968b25afb57fc428695693484ad8576718 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 20 Mar 2026 22:21:56 +0800 Subject: Refactor code to use modern Rust idioms and fix clippy lints --- tools/build_helper/src/bin/exporter.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/build_helper/src') diff --git a/tools/build_helper/src/bin/exporter.rs b/tools/build_helper/src/bin/exporter.rs index c20694b..322e890 100644 --- a/tools/build_helper/src/bin/exporter.rs +++ b/tools/build_helper/src/bin/exporter.rs @@ -213,8 +213,8 @@ fn copy_configs() -> Result, std::io::Error> { let mut copy_configs = Vec::new(); - if let Some(copies) = config.get("copies") { - if let Some(tables) = copies.as_table() { + if let Some(copies) = config.get("copies") + && let Some(tables) = copies.as_table() { for (_, table) in tables { if let Some(from) = table.get("from").and_then(|v| v.as_str()) { let to = table.get("to").and_then(|v| v.as_str()).unwrap_or(""); @@ -238,7 +238,6 @@ fn copy_configs() -> Result, std::io::Error> { } } } - } Ok(copy_configs) } -- cgit