Skip to content

Commit

Permalink
Update base64 requirement from 0.13.0 to 0.22.1 (#198)
Browse files Browse the repository at this point in the history
* Update base64 requirement from 0.13.0 to 0.22.1

Updates the requirements on [base64](https://github.com/marshallpierce/rust-base64) to permit the latest version.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](marshallpierce/rust-base64@v0.13.0...v0.22.1)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Andrei Gherghescu <[email protected]>

* update implementation to work with new base64 crate version

Signed-off-by: Andrei Gherghescu <[email protected]>

* don't pin down patch version for base64 crate

Signed-off-by: Andrei Gherghescu <[email protected]>

* remove conditional compilation for already ignored test

Signed-off-by: Andrei Gherghescu <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Andrei Gherghescu <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrei Gherghescu <[email protected]>
  • Loading branch information
dependabot[bot] and andrei-ng authored May 1, 2024
1 parent 14dc885 commit 1ce30f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion plotly/src/plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ mod tests {
assert!(!dst.exists());
}

#[cfg(not(target_os = "windows"))]
#[test]
#[ignore] // This seems to fail unpredictably on MacOs.
#[cfg(feature = "kaleido")]
Expand Down
2 changes: 1 addition & 1 deletion plotly_kaleido/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exclude = ["target/*", "kaleido/*", "examples/*"]
[dependencies]
serde = { version = "1.0.132", features = ["derive"] }
serde_json = "1.0.73"
base64 = "0.13.0"
base64 = "0.22"
dunce = "1.0.2"
directories = ">=4, <6"

Expand Down
4 changes: 2 additions & 2 deletions plotly_kaleido/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use std::io::BufReader;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};

use base64::{engine::general_purpose, Engine as _};
use directories::ProjectDirs;
use serde::{Deserialize, Serialize};
use serde_json::Value;
Expand Down Expand Up @@ -168,7 +169,7 @@ impl Kaleido {
if let Some(image_data) = res.result {
let data: Vec<u8> = match format {
"svg" | "eps" => image_data.as_bytes().to_vec(),
_ => base64::decode(image_data).unwrap(),
_ => general_purpose::STANDARD.decode(image_data).unwrap(),
};
let mut file = File::create(dst.as_path())?;
file.write_all(&data)?;
Expand Down Expand Up @@ -292,7 +293,6 @@ mod tests {
assert!(std::fs::remove_file(dst.as_path()).is_ok());
}

#[cfg(not(target_os = "windows"))]
#[test]
#[ignore]
fn test_save_eps() {
Expand Down

0 comments on commit 1ce30f0

Please sign in to comment.