From 5ad8443c8d6d9ed3f9d28ac52af529ceb41d741f Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 1 Jan 2025 05:42:45 +0300 Subject: Get rid of base64 and hex in favor of data_encoding crate Less dependency duplication = more fun Change-Id: Icbd0497a68fdd5bea3757e3c62c80008b87bce96 --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 3aee6c3..f57b0be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ -use base64::Engine; use kittybox::{database::Storage, indieauth::backend::AuthBackend, media::storage::MediaStore, webmentions::Webmention, compose_kittybox}; use tokio::{sync::Mutex, task::JoinSet}; use std::{env, future::IntoFuture, sync::Arc}; @@ -82,7 +81,7 @@ async fn main() { // TODO: load from environment let cookie_key = axum_extra::extract::cookie::Key::from(&env::var("COOKIE_KEY") .as_deref() - .map(|s| base64::prelude::BASE64_STANDARD.decode(s.as_bytes()) + .map(|s| data_encoding::BASE64_MIME_PERMISSIVE.decode(s.as_bytes()) .expect("Invalid cookie key: must be base64 encoded") ) .unwrap() -- cgit 1.4.1