From eac49ada8c0bc62a2b5f3f3ccee22e59065e0ae5 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Wed, 24 Apr 2024 23:27:04 +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 899416c..c6a653c 100644 --- a/src/components/inspector.rs +++ b/src/components/inspector.rs @@ -63,7 +63,7 @@ impl InspectorComponent { let state = TreeState::new() .with_opened(session.opened_widget_value_ids.clone()) .with_selected(session.selected_widget_value_id.clone()); - let items = Tree::make_lines(&root, &state, &vec![], &vec![]); + let items = Tree::make_lines(&root, &state, &[], &[]); let current_index = items.iter().position(|(id, _)| { if let Some(selected) = session.selected_widget_value_id.as_ref() { @@ -110,7 +110,7 @@ impl InspectorComponent { let state = TreeState::new() .with_opened(session.opened_widget_value_ids.clone()) .with_selected(session.selected_widget_value_id.clone()); - let items = Tree::make_lines(&root, &state, &vec![], &vec![]); + let items = Tree::make_lines(&root, &state, &[], &[]); let current_index = items.iter().position(|(id, _)| { if let Some(selected) = session.selected_widget_value_id.as_ref() { diff --git a/src/widgets/tree.rs b/src/widgets/tree.rs index ed3eac7..03e9744 100644 --- a/src/widgets/tree.rs +++ b/src/widgets/tree.rs @@ -170,7 +170,7 @@ impl<'a> StatefulWidgetRef for Tree<'a> { type State = TreeState; fn render_ref(&self, area: Rect, buf: &mut Buffer, state: &mut Self::State) { - let lines = Self::make_lines(&self.root, state, &vec![], &vec![]); + let lines = Self::make_lines(&self.root, state, &[], &[]); let items = lines.iter().map(|line| ListItem::new(line.1.clone())); let mut list = List::new(items) .style(self.style)