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
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:
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 {
|
impl Backend for Hostish {
|
||||||
fn drain_events(&mut self) -> Vec<AppEvent> {
|
fn drain_events(&mut self) -> Vec<AppEvent> {
|
||||||
self.queued.drain(..).collect()
|
std::mem::take(&mut self.queued)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dispatch(&mut self, command: AppCommand) {
|
fn dispatch(&mut self, command: AppCommand) {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ fn row<'a>(group: &'a SettingGroupView, key: &str) -> &'a SettingRowView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// 选项表里被选中的那一项(页面正是按 `selected` 下标画选中的 chip)。
|
/// 选项表里被选中的那一项(页面正是按 `selected` 下标画选中的 chip)。
|
||||||
fn chosen<'a>(row: &'a SettingRowView) -> &'a str {
|
fn chosen(row: &SettingRowView) -> &str {
|
||||||
row.options
|
row.options
|
||||||
.get(usize::try_from(row.selected).expect("下标非负"))
|
.get(usize::try_from(row.selected).expect("下标非负"))
|
||||||
.map_or("<越界下标>", String::as_str)
|
.map_or("<越界下标>", String::as_str)
|
||||||
|
|||||||
Reference in new issue
Block a user