bhcli

"Strange's fork of n0tr1v's bhcli (onion)"
git clone https://git.dasho.dev/Strange/bhcli.git
Log | Files | Refs | README

commit b6339e84ba1e3ba335b0eba254658192b67f34ac
parent 80466696e1f442d45cdbc1c0b55edd2ac0940d0c
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri,  7 Apr 2023 04:18:10 -0700

cleanup

Diffstat:
Msrc/main.rs | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -1449,18 +1449,18 @@ 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(); - if let Some(_) = bold.attr("checked") { + if bold.attr("checked").is_some() { params.push(("bold", "on".to_owned())); } - if let Some(_) = italic.attr("checked") { + if italic.attr("checked").is_some() { params.push(("italic", "on".to_owned())); } - if let Some(_) = small.attr("checked") { + if small.attr("checked").is_some() { params.push(("small", "on".to_owned())); } let font_select = doc.find(Attr("name", "font")).next().unwrap(); let font = font_select.find(Name("option")).find_map(|el| { - if let Some(_) = el.attr("selected") { + if el.attr("selected").is_some() { return Some(el.attr("value").unwrap()); } None @@ -1813,7 +1813,7 @@ fn start_dnmx_mail_notifier(client: &Client, username: &str, password: &str) { if let Some(table) = doc.find(Name("table")).nth(7) { table.find(Name("tr")).skip(1).for_each(|n| { if let Some(td) = n.find(Name("td")).nth(2) { - if let Some(_) = td.find(Name("b")).nth(0) { + if td.find(Name("b")).nth(0).is_some() { nb_mails += 1; } }