1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Flip if-else:s with a negation (#8063)

This commit is contained in:
Emil Ernerfeldt
2026-04-04 12:03:41 +02:00
committed by GitHub
parent eb35f7d12f
commit c2b482ff7e
9 changed files with 44 additions and 44 deletions

View File

@@ -466,10 +466,10 @@ impl WrapApp {
for file in &i.raw.hovered_files {
if let Some(path) = &file.path {
write!(text, "\n{}", path.display()).ok();
} else if !file.mime.is_empty() {
write!(text, "\n{}", file.mime).ok();
} else {
} else if file.mime.is_empty() {
text += "\n???";
} else {
write!(text, "\n{}", file.mime).ok();
}
}
text
@@ -505,10 +505,10 @@ impl WrapApp {
for file in &self.dropped_files {
let mut info = if let Some(path) = &file.path {
path.display().to_string()
} else if !file.name.is_empty() {
file.name.clone()
} else {
} else if file.name.is_empty() {
"???".to_owned()
} else {
file.name.clone()
};
let mut additional_info = vec![];