mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 08:04:52 +01:00
Clippy
This commit is contained in:
@@ -498,7 +498,7 @@ pub fn service_status(service: String) -> bool {
|
||||
}
|
||||
};
|
||||
let status_result = my_service.query_status();
|
||||
if let Ok(..) = status_result {
|
||||
if status_result.is_ok() {
|
||||
let status = status_result.unwrap();
|
||||
println!("{} service status: {:?}", service, status.current_state);
|
||||
if status.current_state == Stopped {
|
||||
|
||||
@@ -36,8 +36,8 @@ pub(crate) async fn valid_url(url: String) -> bool {
|
||||
.await
|
||||
.ok();
|
||||
|
||||
if response.is_some() {
|
||||
return response.unwrap().status().as_str() == "200";
|
||||
if let Some(thing) = response {
|
||||
return thing.status().as_str() == "200";
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user