1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

clippy fixes for rust 1.52

This commit is contained in:
Emil Ernerfeldt
2021-05-06 20:49:22 +02:00
parent 29668b5128
commit 0d71017ad4
6 changed files with 70 additions and 77 deletions

View File

@@ -42,12 +42,12 @@ impl Default for Demos {
.to_owned(),
);
Self { open, demos }
Self { demos, open }
}
}
impl Demos {
pub fn checkboxes(&mut self, ui: &mut Ui) {
let Self { open, demos } = self;
let Self { demos, open } = self;
for demo in demos {
let mut is_open = open.contains(demo.name());
ui.checkbox(&mut is_open, demo.name());
@@ -56,7 +56,7 @@ impl Demos {
}
pub fn show(&mut self, ctx: &CtxRef) {
let Self { open, demos } = self;
let Self { demos, open } = self;
for demo in demos {
let mut is_open = open.contains(demo.name());
demo.show(ctx, &mut is_open);