bhcli

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

commit 0aa5534e73679afa791749b89d43ee4043b3b1ca
parent feee2429c9a3e470dcf95a1525f2a0c4ddec94dc
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 30 Mar 2023 21:46:24 -0700

avoid useless clone

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 @@ -217,8 +217,8 @@ fn solve_path(starting: Letter, letters_map: &HashMap<char, Letter>, img: &Dynam .count(); dest_count.insert(dest.clone(), red); } - if let Some((dest_max, _)) = dest_count.iter().max_by(|a, b| a.1.cmp(b.1)) { - letter = dest_max.clone(); + if let Some((dest_max, _)) = dest_count.into_iter().max_by(|a, b| a.1.cmp(&b.1)) { + letter = dest_max; } } answer