Skip to content

Commit

Permalink
Fixing clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
notdanilo committed Oct 23, 2023
1 parent c95104a commit a7208e5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tools/editor/src/gui/ui/utils/editable_list/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ impl EditableList {
let mut remove_list = Vec::new();
for (index, item) in list.iter_mut().enumerate() {
ui.horizontal_top(|ui| {
if self.editable {
if ui.button("x").clicked() {
remove_list.push(index);
}
if self.editable && ui.button("x").clicked() {
remove_list.push(index);
}
ui.push_id(index, |ui| {
show_item(ui, item);
Expand All @@ -47,11 +45,9 @@ impl EditableList {
for index in remove_list.into_iter().rev() {
list.remove(index);
}
if self.editable {
if ui.button(&self.add_button_name).clicked() {
list.push(T::default());
}
}
if self.editable && ui.button(&self.add_button_name).clicked() {
list.push(T::default());
}
});
}
}
Expand Down

0 comments on commit a7208e5

Please sign in to comment.