bhcli

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

commit 5789320f1242ed3dbc677509a96b97e1e75f4ce3
parent 3fffb9adb7407ae2b1a99ad0179468b0ada3c217
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 29 Mar 2023 22:43:27 -0700

simplify code

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

diff --git a/src/lechatphp/mod.rs b/src/lechatphp/mod.rs @@ -146,7 +146,7 @@ fn solve_difficulty2(img: &DynamicImage) -> Option<String> { Some(answer) } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] struct Letter { offset: Point, character: char, @@ -354,7 +354,7 @@ fn get_letter_in_direction(letter: &Letter, angle: f64, letters_map: &HashMap<ch let mut out: Option<Letter> = None; // Visit every other letters for (_, other_letter) in letters_map.iter() { - if other_letter.key() == letter.key() { + if other_letter == letter { continue; } // Find the angle between the two letters @@ -395,7 +395,7 @@ impl Rect { } } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] struct Point { x: u32, y: u32,