Skip to content

Commit 08403c9

Browse files
Update base64 dependency to 0.21.0 (#5702)
* Update base64 to 0.21.0 * Update code for base64 0.21.0
1 parent 673b448 commit 08403c9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cache/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition.workspace = true
1010

1111
[dependencies]
1212
anyhow = { workspace = true }
13-
base64 = "0.13.0"
13+
base64 = "0.21.0"
1414
bincode = "1.1.4"
1515
directories-next = "2.0"
1616
file-per-thread-logger = "0.1.1"

crates/cache/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use base64::Engine;
12
use log::{debug, trace, warn};
23
use serde::{Deserialize, Serialize};
34
use sha2::{Digest, Sha256};
@@ -86,7 +87,7 @@ impl<'config> ModuleCacheEntry<'config> {
8687
state.hash(&mut hasher);
8788
let hash: [u8; 32] = hasher.0.finalize().into();
8889
// standard encoding uses '/' which can't be used for filename
89-
let hash = base64::encode_config(&hash, base64::URL_SAFE_NO_PAD);
90+
let hash = base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(&hash);
9091

9192
if let Some(cached_val) = inner.get_data(&hash) {
9293
if let Some(val) = deserialize(state, cached_val) {

0 commit comments

Comments
 (0)