From 94244ed6f1521d46b94e85d3418803338e36d889 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Thu, 25 Apr 2024 16:42:54 +0900 Subject: [PATCH] clippy fix --- src/components/inspector.rs | 4 ++-- src/widgets/tree.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/inspector.rs b/src/components/inspector.rs index dd7868f..6a1f52e 100644 --- a/src/components/inspector.rs +++ b/src/components/inspector.rs @@ -211,8 +211,8 @@ impl Component for InspectorComponent { }, ); - self.state.opened = session.opened_widget_value_ids.clone(); - self.state.selected = session.selected_widget_value_id.clone(); + self.state.opened.clone_from(&session.opened_widget_value_ids); + self.state.selected.clone_from(&session.selected_widget_value_id); if let Some(selected_widget_value_id) = session.selected_widget_value_id.as_ref() { *self.state.selected_mut() = Some(selected_widget_value_id.clone()); } diff --git a/src/widgets/tree.rs b/src/widgets/tree.rs index d0b0a62..1753456 100644 --- a/src/widgets/tree.rs +++ b/src/widgets/tree.rs @@ -238,7 +238,7 @@ impl<'a> StatefulWidgetRef for Tree<'a> { continue; } if indent_rest > span.width() { - indent_rest = indent_rest - span.width(); + indent_rest -= span.width(); continue; }