1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Enable clippy::iter_over_hash_type lint (#7421)

This helped discover a few things that _might_ have been buggy.
This commit is contained in:
Emil Ernerfeldt
2025-08-06 13:55:53 +02:00
committed by GitHub
parent d42ea3800f
commit 36a4981f29
22 changed files with 114 additions and 60 deletions

View File

@@ -54,7 +54,11 @@ fn viewport_content(ui: &mut egui::Ui, ctx: &egui::Context, open: &mut bool) {
egui::ScrollArea::vertical().show(ui, |ui| {
let viewports = ui.input(|i| i.raw.viewports.clone());
for (id, viewport) in viewports {
let ordered_viewports = viewports
.iter()
.map(|(id, viewport)| (*id, viewport.clone()))
.collect::<egui::OrderedViewportIdMap<_>>();
for (id, viewport) in ordered_viewports {
ui.group(|ui| {
ui.label(format!("viewport {id:?}"));
ui.push_id(id, |ui| {