remove unnecessary returns

This commit is contained in:
Mystikfluu 2023-04-01 23:59:12 +02:00
parent 6d6aca7bc1
commit b2e8ad58d5

View File

@ -67,15 +67,15 @@ pub async fn isync_compare_hashes() -> bool {
let body = res.json::<HashRes>().await.unwrap(); let body = res.json::<HashRes>().await.unwrap();
if body.success { if body.success {
println!("Hash: {} {}", hash, body.hash); println!("Hash: {} {}", hash, body.hash);
return body.hash == hash; body.hash == hash
} else { } else {
eprintln!("Error: {}", body.errorcode); eprintln!("Error: {}", body.errorcode);
return true; true
} }
}, },
None => { None => {
eprintln!("No token found!"); eprintln!("No token found!");
return true; true
} }
} }
} }
@ -154,13 +154,13 @@ pub async fn isync_save() -> bool {
let res = client.execute(req).await.unwrap(); let res = client.execute(req).await.unwrap();
let response = res.json::<Save>().await.unwrap(); let response = res.json::<Save>().await.unwrap();
if response.success { if response.success {
return true; true
} else { } else {
if response.status == 200 { if response.status == 200 {
return true; return true;
} }
eprintln!("Error: {}", response.errorcode); eprintln!("Error: {}", response.errorcode);
return false; false
} }
}, },
None => { None => {