Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
itome committed Apr 24, 2024
1 parent 1dd9039 commit eac49ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit eac49ad

Please sign in to comment.