fix(ci): 修两处 clippy -D warnings 红(needless_lifetimes / drain_collect)
Guards / 依赖许可与来源(cargo-deny) (push) Canceled after 0s
Guards / 文件行数 ≤400 守门 (push) Canceled after 0s
Guards / unsafe 落点守门(集合必须恰好等于期望) (push) Canceled after 0s
Guards / design 零第三方依赖守门 (push) Canceled after 0s
Guards / presenter 零 UI 守门 (push) Canceled after 0s
Guards / core 零 UI 守门 (push) Canceled after 0s
Dev Guards / 架构与合规守门(同 main 口径) (push) Canceled after 0s
Dev Guards / fmt (rustfmt --check) (push) Canceled after 0s
Dev Guards / clippy (ubuntu) (push) Canceled after 0s

两处都来自 M201(5dda9ac),非本轮 mission 引入。tower 合并门此前只跑
fmt+check+test,从未跑 clippy,所以 dev 上 CI 的 clippy job 一直是红的没人发现。

- presenter/host/settings/download_tests.rs: chosen 的显式生命周期可省略
- app-iced/.../download_tests.rs: drain(..).collect() -> mem::take

语义等价,纯 lint。门禁已补上 clippy(见 00-恢复指引 §6)。
This commit is contained in:
AskaEth committed 2026-11-09 13:56:09 +08:00
1 parent 413553d3ea
commit 391ebf88b7
2 files changed
+2 -2

No files matched your search

@@ -78,7 +78,7 @@ struct Hostish {
impl Backend for Hostish {
fn drain_events(&mut self) -> Vec<AppEvent> {
self.queued.drain(..).collect()
std::mem::take(&mut self.queued)
}
fn dispatch(&mut self, command: AppCommand) {