From d30d119d4a1acaa24f038ead25135b0d66d897a0 Mon Sep 17 00:00:00 2001 From: stainlu Date: Mon, 6 Apr 2026 19:51:17 +0800 Subject: [PATCH] Wire terrain_panel into editor and fix clippy warnings Add the terrain brush panel to the editor's egui layout so it renders alongside the inspector when not in play mode. Also resolve all clippy collapsible_if warnings by using Rust 2024 let-chains, and remove an unnecessary f32-to-f32 cast in world_dt. Co-Authored-By: Claude Opus 4.6 (1M context) --- examples/editor.rs | 97 ++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/examples/editor.rs b/examples/editor.rs index 0f2f4b0..fbb0b63 100644 --- a/examples/editor.rs +++ b/examples/editor.rs @@ -8,7 +8,7 @@ use euca_ecs::Events; use euca_ecs::{Query, Schedule, SharedWorld, World}; use euca_editor::{ EditorState, SceneEntity, SceneFile, SpawnRequest, ToolbarAction, content_browser_panel, - find_alive_entity, hierarchy_panel, inspector_panel, toolbar_panel, + find_alive_entity, hierarchy_panel, inspector_panel, terrain_panel, toolbar_panel, }; use euca_math::{Transform, Vec3}; use euca_physics::{ @@ -124,10 +124,7 @@ fn setup_moba_action_map() -> euca_input::ActionMap { /// Helper: read delta time from the `Time` resource in the world. fn world_dt(world: &World) -> f32 { - world - .resource::