From 3b59dbd77209c66988d1537d0e81c4176c232d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Maita?= <47983254+mnmaita@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:55:54 -0300 Subject: [PATCH] Update base64 requirement from 0.13.0 to 0.21.5 (#10336) # Objective - Update base64 requirement from 0.13.0 to 0.21.5. - Closes #10317. ## Solution - Bumped `base64` requirement and manually migrated code to fix a breaking change after updating. --- crates/bevy_gltf/Cargo.toml | 2 +- crates/bevy_gltf/src/loader.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index 1454fa94e00f2..d3cf482c4b587 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -47,7 +47,7 @@ gltf = { version = "1.3.0", default-features = false, features = [ "utils", ] } thiserror = "1.0" -base64 = "0.13.0" +base64 = "0.21.5" percent-encoding = "2.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1" diff --git a/crates/bevy_gltf/src/loader.rs b/crates/bevy_gltf/src/loader.rs index c4280caf1a08e..cc147c59d0370 100644 --- a/crates/bevy_gltf/src/loader.rs +++ b/crates/bevy_gltf/src/loader.rs @@ -1448,7 +1448,7 @@ impl<'a> DataUri<'a> { fn decode(&self) -> Result, base64::DecodeError> { if self.base64 { - base64::decode(self.data) + base64::Engine::decode(&base64::engine::general_purpose::STANDARD_NO_PAD, self.data) } else { Ok(self.data.as_bytes().to_owned()) }