Skip to content

Commit 2260c5a

Browse files
committed
rustfmt
1 parent 0c6ae17 commit 2260c5a

File tree

1 file changed

+41
-39
lines changed

1 file changed

+41
-39
lines changed

src/information_panel.rs

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -386,49 +386,51 @@ impl InformationPanel {
386386
}
387387

388388
fn display_meta_data(&self, ui: &mut Ui, id: egui::Id, width: f32, item: &DirectoryEntry) {
389-
egui::ScrollArea::vertical().id_salt(id.with("meta_data_scroll")).show(ui, |ui| {
390-
egui::Grid::new(id.with("meta_data_grid"))
391-
.num_columns(2)
392-
.striped(true)
393-
.min_col_width(width)
394-
.max_col_width(width)
395-
.show(ui, |ui| {
396-
ui.label("Filename: ");
397-
ui.label(item.file_name().to_string());
398-
ui.end_row();
399-
400-
if let Some(size) = item.metadata().size {
401-
ui.label("File Size: ");
402-
if item.is_file() {
403-
ui.label(format_bytes(size));
404-
} else {
405-
ui.label("NAN");
406-
}
389+
egui::ScrollArea::vertical()
390+
.id_salt(id.with("meta_data_scroll"))
391+
.show(ui, |ui| {
392+
egui::Grid::new(id.with("meta_data_grid"))
393+
.num_columns(2)
394+
.striped(true)
395+
.min_col_width(width)
396+
.max_col_width(width)
397+
.show(ui, |ui| {
398+
ui.label("Filename: ");
399+
ui.label(item.file_name().to_string());
407400
ui.end_row();
408-
}
409401

410-
if let Some(date) = item.metadata().created {
411-
ui.label("Created: ");
412-
let created: DateTime<Local> = date.into();
413-
ui.label(format!("{}", created.format("%d.%m.%Y, %H:%M:%S")));
414-
ui.end_row();
415-
}
402+
if let Some(size) = item.metadata().size {
403+
ui.label("File Size: ");
404+
if item.is_file() {
405+
ui.label(format_bytes(size));
406+
} else {
407+
ui.label("NAN");
408+
}
409+
ui.end_row();
410+
}
416411

417-
if let Some(date) = item.metadata().last_modified {
418-
ui.label("Last Modified: ");
419-
let modified: DateTime<Local> = date.into();
420-
ui.label(format!("{}", modified.format("%d.%m.%Y, %H:%M:%S")));
421-
ui.end_row();
422-
}
412+
if let Some(date) = item.metadata().created {
413+
ui.label("Created: ");
414+
let created: DateTime<Local> = date.into();
415+
ui.label(format!("{}", created.format("%d.%m.%Y, %H:%M:%S")));
416+
ui.end_row();
417+
}
423418

424-
// show additional metadata, if present
425-
for (key, value) in self.other_meta_data.clone() {
426-
ui.label(key);
427-
ui.label(value);
428-
ui.end_row();
429-
}
430-
});
431-
});
419+
if let Some(date) = item.metadata().last_modified {
420+
ui.label("Last Modified: ");
421+
let modified: DateTime<Local> = date.into();
422+
ui.label(format!("{}", modified.format("%d.%m.%Y, %H:%M:%S")));
423+
ui.end_row();
424+
}
425+
426+
// show additional metadata, if present
427+
for (key, value) in self.other_meta_data.clone() {
428+
ui.label(key);
429+
ui.label(value);
430+
ui.end_row();
431+
}
432+
});
433+
});
432434
}
433435
}
434436

0 commit comments

Comments
 (0)