Clean up Rust anti-patterns before strict maxi-config lint enforcement
Prepare this repo for the strict Rust standards rollout tracked in `maxi-config#40`.
Local read-only scan evidence: 2597 target-pattern hits, including 688 `unwrap()`, 78 `expect()`, 852 `.clone()`, 372 `.to_string()`, 58 `Rc<RefCell>`, 13 `Arc<Mutex>`, 16 owned `String` params, 340 `'static` usages/bounds, 98 `Vec::new()`, 47 `Box<dyn ...>`, and 31 default `HashMap` patterns.
Cleanup expectations: remove avoidable panic paths, reduce ownership churn, prefer borrowed APIs, justify or remove interior mutability/shared locks, use allocation-aware construction, and review dynamic dispatch/hashers in hot paths.
Done when first-party Rust code passes the strict policy from `maxi-config#40`, exceptions are explicit, and tests/build still pass.
关闭于 2026-06-17 1 条评论