1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Minor code cleanup and clippy fixes

This commit is contained in:
Emil Ernerfeldt
2020-04-24 18:47:14 +02:00
parent ddc34d654b
commit a66f4efaac
9 changed files with 42 additions and 58 deletions

View File

@@ -104,10 +104,8 @@ impl ExampleApp {
region.columns(self.num_columns, |cols| {
for (i, col) in cols.iter_mut().enumerate() {
col.add(label!("Column {} out of {}", i + 1, self.num_columns));
if i + 1 == self.num_columns {
if col.add(Button::new("Delete this")).clicked {
self.num_columns -= 1;
}
if i + 1 == self.num_columns && col.add(Button::new("Delete this")).clicked {
self.num_columns -= 1;
}
}
});