mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-01-08 12:07:45 +08:00
Clippy
This commit is contained in:
parent
dcc2b1707b
commit
422ce59f96
@ -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
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user