bhcli

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

commit c761c279a0b62dfe2ac9deba9046e21302ab41ad
parent 6a65d7d32c563e367fca1deedb37bd61990a59ca
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue, 28 Mar 2023 14:15:38 -0700

simplify code

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

diff --git a/src/lechatphp/mod.rs b/src/lechatphp/mod.rs @@ -82,9 +82,8 @@ pub fn solve_b64(b64_str: &str) -> Option<String> { fn solve_difficulty1(img: DynamicImage) -> Option<String> { let mut answer = String::new(); - let mut x = 5; for i in 0..5 { - let sub_img = img.crop_imm(x, 7, 8, 14); + let sub_img = img.crop_imm(5 + ((8+1)*i), 7, 8, 14); let mut buf = vec![]; { let mut enc = image::codecs::gif::GifEncoder::new(&mut buf); @@ -99,7 +98,6 @@ fn solve_difficulty1(img: DynamicImage) -> Option<String> { println!("{} {}", i, letter_b64); return None; } - x += 8+1; } Some(answer) } \ No newline at end of file