Skip to content

Commit

Permalink
Use bool
Browse files Browse the repository at this point in the history
  • Loading branch information
ckcr4lyf committed Nov 13, 2024
1 parent 6e6e37b commit a727ac0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bin/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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?;
}
}
Expand Down

0 comments on commit a727ac0

Please sign in to comment.