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:
@@ -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![];
|
||||
|
||||
Reference in New Issue
Block a user