mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 15:14:35 +01:00
Clippy
This commit is contained in:
@@ -7,7 +7,7 @@ license = ""
|
||||
repository = "https://github.com/Grasscutters/Cultivation.git"
|
||||
default-run = "cultivation"
|
||||
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
|
||||
|
||||
|
||||
@@ -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