bhcli

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

commit a7c5d0a720eaa86068bfc054abbc31e43efd6b3a
parent 547076078dbf5aad2175d6f274a535c1e4720657
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri, 31 Mar 2023 16:55:02 -0700

simplify code

Diffstat:
Msrc/lechatphp/mod.rs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lechatphp/mod.rs b/src/lechatphp/mod.rs @@ -191,7 +191,7 @@ fn solve_path(starting: Letter, letters_map: &HashMap<char, Letter>, img: &Dynam .count(); dest_count.insert(dest, red); } - if let Some((dest_max, _)) = dest_count.into_iter().max_by(|a, b| a.1.cmp(&b.1)) { + if let Some((dest_max, _)) = dest_count.into_iter().max_by_key(|e| e.1) { letter = remaining.take(dest_max).unwrap(); } }