From 085c59393bbca05fc77de5c7ee7b0669ab287734 Mon Sep 17 00:00:00 2001 From: Francis Chua Date: Sun, 28 Jan 2024 18:36:11 -0800 Subject: [PATCH] fix warnings --- crates/egui_demo_lib/src/demo/pan_zoom.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/egui_demo_lib/src/demo/pan_zoom.rs b/crates/egui_demo_lib/src/demo/pan_zoom.rs index 5918f6f1987..873c642d2d4 100644 --- a/crates/egui_demo_lib/src/demo/pan_zoom.rs +++ b/crates/egui_demo_lib/src/demo/pan_zoom.rs @@ -1,5 +1,3 @@ -use egui::{Area, Sense}; - #[derive(Clone, Default, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub struct PanZoom { @@ -57,7 +55,7 @@ impl super::View for PanZoom { } let current_size = ui.min_rect(); - let layer_ids = [ + [ ( current_size.left_top() + egui::Vec2::new(10.0, 10.0), "top left!", @@ -77,7 +75,7 @@ impl super::View for PanZoom { ] .iter() .map(|(pos, msg)| { - Area::new(*msg) + egui::Area::new(*msg) .default_pos(*pos) // Need to cover up the pan_zoom demo window, // but may also cover over other windows.