summaryrefslogtreecommitdiff
path: root/subplotlib/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'subplotlib/src/utils.rs')
-rw-r--r--subplotlib/src/utils.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/subplotlib/src/utils.rs b/subplotlib/src/utils.rs
index 642848a..25a9360 100644
--- a/subplotlib/src/utils.rs
+++ b/subplotlib/src/utils.rs
@@ -1,5 +1,7 @@
//! Utility functions used by subplotlib or the generated test functions
+use base64::prelude::{Engine as _, BASE64_STANDARD};
+
/// Decode a base64 string.
///
/// If the result is not a valid utf8 string then it is lossily coerced.
@@ -14,6 +16,6 @@
///
/// Will panic if it's not valid base64 leading to a string.
pub fn base64_decode(input: &str) -> String {
- let dec = base64::decode(input).expect("bad base64");
+ let dec = BASE64_STANDARD.decode(input).expect("bad base64");
String::from_utf8_lossy(&dec).to_string()
}