From 8131b7b898df44b8d04227c3f30ca30bc1a003fd Mon Sep 17 00:00:00 2001 From: Ryan Bluth Date: Sat, 28 Dec 2024 10:01:30 -0500 Subject: [PATCH 1/3] Make image extension lowercase before checking if it is supported (#5501) * Images with capitalized extensions do not load because the list of extensions they are checked against is lowercase. The image extension is now converted to lowercase before comparing * [x ] I have followed the instructions in the PR template --- crates/egui_extras/src/loaders/image_loader.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/egui_extras/src/loaders/image_loader.rs b/crates/egui_extras/src/loaders/image_loader.rs index 4c1a846e26b..171e56170db 100644 --- a/crates/egui_extras/src/loaders/image_loader.rs +++ b/crates/egui_extras/src/loaders/image_loader.rs @@ -19,7 +19,10 @@ 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().map(|ext| ext.to_lowercase())) + else { // `true` because if there's no extension, assume that we support it return true; }; From f37a8f91ca62629dfc62e23188c1aae40da04bed Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 28 Dec 2024 21:44:56 +0100 Subject: [PATCH 2/3] Better output when building demo --- scripts/setup_web.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/setup_web.sh b/scripts/setup_web.sh index 879f0a77e68..80dbc85b846 100755 --- a/scripts/setup_web.sh +++ b/scripts/setup_web.sh @@ -3,6 +3,8 @@ set -eu script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) cd "$script_path/.." +set -x + # Pre-requisites: rustup target add wasm32-unknown-unknown From 820d42802ac79abc57bbfafc38f5b6e93222cdf1 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sat, 28 Dec 2024 21:52:37 +0100 Subject: [PATCH 3/3] Fix build of egui.rs (#5528) --- scripts/setup_web.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup_web.sh b/scripts/setup_web.sh index 80dbc85b846..245ff427ab0 100755 --- a/scripts/setup_web.sh +++ b/scripts/setup_web.sh @@ -9,4 +9,4 @@ set -x rustup target add wasm32-unknown-unknown # For generating JS bindings: -cargo install --quiet wasm-bindgen-cli --version 0.2.95 +cargo install --force --quiet wasm-bindgen-cli --version 0.2.95