This commit is contained in:
Thoronium 2024-10-30 16:31:09 -06:00
parent dcc2b1707b
commit 422ce59f96
3 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ license = ""
repository = "https://github.com/Grasscutters/Cultivation.git" repository = "https://github.com/Grasscutters/Cultivation.git"
default-run = "cultivation" default-run = "cultivation"
edition = "2021" edition = "2021"
rust-version = "1.57" rust-version = "1.58"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -498,7 +498,7 @@ pub fn service_status(service: String) -> bool {
} }
}; };
let status_result = my_service.query_status(); let status_result = my_service.query_status();
if let Ok(..) = status_result { if status_result.is_ok() {
let status = status_result.unwrap(); let status = status_result.unwrap();
println!("{} service status: {:?}", service, status.current_state); println!("{} service status: {:?}", service, status.current_state);
if status.current_state == Stopped { if status.current_state == Stopped {

View File

@ -36,8 +36,8 @@ pub(crate) async fn valid_url(url: String) -> bool {
.await .await
.ok(); .ok();
if response.is_some() { if let Some(thing) = response {
return response.unwrap().status().as_str() == "200"; return thing.status().as_str() == "200";
} else { } else {
false false
} }