refactor: use data-encoding in examples

This commit is contained in:
Anna 2023-02-20 16:16:56 -05:00
parent d58a2e0c07
commit ded7472d83
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ sqpack = { git = "https://git.anna.lgbt/ascclemens/sqpack-rs", features = ["read
[dev-dependencies]
criterion = "0.4"
base64 = "0.13"
data-encoding = "2"
sha3 = "0.10"
tempfile = "3"

View File

@ -55,7 +55,7 @@ pub fn main() {
std::io::copy(&mut temp, &mut sha).unwrap();
temp.seek(SeekFrom::Start(0)).unwrap();
let hash = sha.finalize_reset();
let hash = base64::encode_config(&*hash, base64::URL_SAFE_NO_PAD);
let hash = data_encoding::BASE64URL_NOPAD.encode(&*hash);
let new = !hashes.contains_key(&hash);
let saved = SavedFile {
game_path: file.file.full_path.clone(),