bhcli

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

commit e14339810dff44c4728aa42563c2e388d1a05d76
parent ec22acbd5c878c50e60e191387f113273692c2ef
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri,  7 Feb 2025 21:07:31 -0800

cleanup unwrap

Diffstat:
Msrc/main.rs | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -1181,7 +1181,6 @@ fn set_profile_base_info( let bold = doc.find(Attr("id", "bold")).next().unwrap(); let italic = doc.find(Attr("id", "italic")).next().unwrap(); let small = doc.find(Attr("id", "small")).next().unwrap(); - let incognito = doc.find(Attr("name", "incognito")).next().unwrap(); if bold.attr("checked").is_some() { params.push(("bold", "on".to_owned())); } @@ -1191,7 +1190,7 @@ fn set_profile_base_info( if small.attr("checked").is_some() { params.push(("small", "on".to_owned())); } - if incognito.attr("checked").is_some() { + if doc.find(Attr("name", "incognito")).next().and_then(|incognito| incognito.attr("checked")).is_some() { params.push(("incognito", "on".to_owned())); } let font_select = doc.find(Attr("name", "font")).next().unwrap();