
adminandClaude Code
a86611d4cf
chore(lint): 清掉 4 条既有 clippy 告警,启用 -D warnings 闸门
**影响**
`cargo clippy --lib --all-targets -- -D warnings` 从「必然失败(4 条既有告警)」变为 **0 告警通过**,
后续任务可以直接把它当闸门用(此前 Task 3 round 5 的实现者因这 4 条告警无法验证自己的改动)。
**改动**
- `src/db.rs:329` / `:374`:`needless_range_loop` ⇒ 改用 `for row in &rows` 直接迭代行。
- `src/db.rs:352`:`needless_question_mark` ⇒ `Ok(rows[0].get::<Option<String>>(0)?)` ⇒ `rows[0].get::<Option<String>>(0)`。
- `src/main.rs:77` / `:81`:`ptr_arg` ⇒ `&PathBuf` ⇒ `&Path`(`identity_path` / `read_identity`),
导入改为 `use std::path::{Path, PathBuf};`。
**设计**
纯机械等价改写:不改查询语义、不改返回类型、不改调用点(`&PathBuf` → `&Path` 由 deref 强转自动成立)。
`cargo test` 全绿:109 + 7 + 1 + 2 doctests,0 失败。
Co-Authored-By: Claude Code <[email protected]>
2026-10-24 20:07:48 +08:00
..
2026-10-24 19:42:35 +08:00
2026-10-24 18:55:28 +08:00
2026-10-24 19:24:37 +08:00
2026-10-24 14:45:00 +08:00
2026-10-24 20:07:48 +08:00
2026-10-24 14:36:17 +08:00
2026-10-24 14:54:48 +08:00
2026-10-24 18:55:28 +08:00
2026-10-24 20:07:48 +08:00
2026-10-24 19:47:55 +08:00
2026-10-24 17:35:29 +08:00
2026-10-24 19:42:35 +08:00