From 8eaad5b765d719ac6fe83b08a5b250d9846a9103 Mon Sep 17 00:00:00 2001 From: Scott Lyons Date: Sun, 11 Aug 2024 13:40:19 -0700 Subject: [PATCH] fix(tokens): fixing token encoding Giving up on doing any kind of base64 encoding on the tokens --- szurubooru-client/src/tokens.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/szurubooru-client/src/tokens.rs b/szurubooru-client/src/tokens.rs index f6f0eb5..7e2d9f8 100644 --- a/szurubooru-client/src/tokens.rs +++ b/szurubooru-client/src/tokens.rs @@ -143,11 +143,11 @@ impl QueryToken { impl Display for QueryToken { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let suffix = if !self.value.is_empty() { - format!(":{}", encode(&self.value)) + format!(":{}", &self.value) } else { "".to_string() }; - write!(f, "{}{}", encode(&self.key), suffix) + write!(f, "{}{}", &self.key, suffix) } } @@ -609,9 +609,6 @@ mod tests { QueryToken::sort(PostSortToken::Random), ]; - assert_eq!( - query_vec.to_query_string(), - "comment-count%3A1%20sort%3Arandom" - ); + assert_eq!(query_vec.to_query_string(), "comment-count:1 sort:random"); } }