summaryrefslogtreecommitdiff
path: root/tools/build_helper/src/bin/exporter.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-20 22:21:56 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-20 22:21:56 +0800
commitab6be7968b25afb57fc428695693484ad8576718 (patch)
treee4af27964f195a18a678844dbe71c0aaa182b5dc /tools/build_helper/src/bin/exporter.rs
parent6b22f7b7694fce530f84ba94c65c057450cca626 (diff)
Refactor code to use modern Rust idioms and fix clippy lints
Diffstat (limited to 'tools/build_helper/src/bin/exporter.rs')
-rw-r--r--tools/build_helper/src/bin/exporter.rs5
1 files changed, 2 insertions, 3 deletions
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<Vec<CopyConfig>, 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<Vec<CopyConfig>, std::io::Error> {
}
}
}
- }
Ok(copy_configs)
}