Skip to content

Commit

Permalink
Update image_loader.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Nov 28, 2024
1 parent 149e715 commit 2aa195f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/egui_extras/src/loaders/image_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl ImageCrateLoader {
}

fn is_supported_uri(uri: &str) -> bool {
let Some(ext) = Path::new(uri).extension().and_then(|ext| ext.to_str()) else {
let Some(_ext) = Path::new(uri).extension().and_then(|ext| ext.to_str()) else {
// `true` because if there's no extension, assume that we support it
return true;
};
Expand All @@ -28,7 +28,7 @@ fn is_supported_uri(uri: &str) -> bool {
ImageFormat::all()
.filter(ImageFormat::reading_enabled)
.flat_map(ImageFormat::extensions_str)
.any(|format_ext| ext == *format_ext)
.any(|format_ext| uri.contains(*format_ext))
}

fn is_unsupported_mime(mime: &str) -> bool {
Expand Down

0 comments on commit 2aa195f

Please sign in to comment.