Skip to content

Commit

Permalink
Update base64 requirement from 0.13.0 to 0.21.5 (#10336)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
mnmaita authored Dec 21, 2023
1 parent dc8fc6c commit 3b59dbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_gltf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_gltf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ impl<'a> DataUri<'a> {

fn decode(&self) -> Result<Vec<u8>, 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())
}
Expand Down

0 comments on commit 3b59dbd

Please sign in to comment.