From a727ac05b8232be3d11094afef6a32cf53beba6e Mon Sep 17 00:00:00 2001 From: Raghu Saxena Date: Wed, 13 Nov 2024 14:00:33 +0800 Subject: [PATCH] Use bool --- src/bin/clean.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/clean.rs b/src/bin/clean.rs index 49cc468..bed7995 100644 --- a/src/bin/clean.rs +++ b/src/bin/clean.rs @@ -19,10 +19,10 @@ async fn main() -> Result<(), Error> { let get_cleaned = match args.get(1) { Some(val) => match val.as_str() { - "TRUE" => "TRUE", - _ => "FALSE" + "TRUE" => true, + _ => false, }, - None => "FALSE" + None => false, }; // Connect to redis @@ -69,7 +69,7 @@ async fn main() -> Result<(), Error> { debug!("result of clean {:?}", cmd); // We should also set cleaned to true, if we got the FALSE ones - if get_cleaned == "FALSE" { + if get_cleaned == false { client.query("UPDATE torrents SET cleaned=TRUE WHERE infohash = $1;", &[&infohash.0]).await?; } }