Skip to content

Update base64 requirement from 0.13.0 to 0.22.1 #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading