bhcli

A TUI for chatting on LE PHP Chats (onion)
git clone https://git.dasho.dev/n0tr1v/bhcli.git
Log | Files | Refs | README

commit 6a65d7d32c563e367fca1deedb37bd61990a59ca
parent 118fcfbc675b5309c90f8335444da2ea466520e0
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue, 28 Mar 2023 13:57:29 -0700

more cleanup

Diffstat:
Msrc/lechatphp/mod.rs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lechatphp/mod.rs b/src/lechatphp/mod.rs @@ -75,8 +75,8 @@ lazy_static! { } pub fn solve_b64(b64_str: &str) -> Option<String> { - let img_dec = general_purpose::STANDARD.decode(b64_str.strip_prefix("data:image/gif;base64,").unwrap()).unwrap(); - let img = image::load_from_memory(&img_dec).unwrap(); + let img_dec = general_purpose::STANDARD.decode(b64_str.strip_prefix("data:image/gif;base64,")?).ok()?; + let img = image::load_from_memory(&img_dec).ok()?; solve_difficulty1(img) }