diff --git a/crates/eframe/src/native/run.rs b/crates/eframe/src/native/run.rs index d9749f58313..14584c72029 100644 --- a/crates/eframe/src/native/run.rs +++ b/crates/eframe/src/native/run.rs @@ -657,7 +657,7 @@ mod glow_integration { if let Some(window) = &viewport.window { let is_viewport_focused = focused_viewport == Some(viewport_id); egui_winit::process_viewport_commands( - std::iter::once(command), + [command], window, is_viewport_focused, ); @@ -2561,11 +2561,7 @@ mod wgpu_integration { .and_then(|vp| vp.window.as_ref()) { let is_viewport_focused = focused_viewport == Some(viewport_id); - egui_winit::process_viewport_commands( - std::iter::once(command), - window, - is_viewport_focused, - ); + egui_winit::process_viewport_commands([command], window, is_viewport_focused); } } diff --git a/crates/eframe/src/web/web_painter_wgpu.rs b/crates/eframe/src/web/web_painter_wgpu.rs index 436dac8181f..d743b52c856 100644 --- a/crates/eframe/src/web/web_painter_wgpu.rs +++ b/crates/eframe/src/web/web_painter_wgpu.rs @@ -270,11 +270,9 @@ impl WebPainter for WebPainterWgpu { } // Submit the commands: both the main buffer and user-defined ones. - render_state.queue.submit( - user_cmd_bufs - .into_iter() - .chain(std::iter::once(encoder.finish())), - ); + render_state + .queue + .submit(user_cmd_bufs.into_iter().chain([encoder.finish()])); if let Some(frame) = frame { frame.present(); diff --git a/crates/egui-wgpu/src/winit.rs b/crates/egui-wgpu/src/winit.rs index d1994e8ad51..68803a24b2b 100644 --- a/crates/egui-wgpu/src/winit.rs +++ b/crates/egui-wgpu/src/winit.rs @@ -615,7 +615,7 @@ impl Painter { crate::profile_scope!("Queue::submit"); render_state .queue - .submit(user_cmd_bufs.into_iter().chain(std::iter::once(encoded))); + .submit(user_cmd_bufs.into_iter().chain([encoded])); }; let screenshot = if capture {