1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-04 01:24:09 +02:00

clippy fixes

This commit is contained in:
Robin Appelman 2023-05-04 18:53:38 +02:00
commit abe04b52d0
12 changed files with 101 additions and 104 deletions

View file

@ -86,9 +86,10 @@ impl PhpVersion {
}
}
#[allow(clippy::too_many_arguments)]
pub async fn spawn(
&self,
docker: &mut Docker,
docker: &Docker,
id: &str,
env: Vec<String>,
db: &Database,
@ -170,11 +171,11 @@ impl PhpVersion {
let client = Client::new();
let url = Url::parse(&format!(
"http://{}/status.php",
ip.ok_or(Report::msg("Container not running"))?
ip.ok_or_else(|| Report::msg("Container not running"))?
))
.into_diagnostic()?;
timeout(Duration::from_secs(15), async {
while !client.get(url.clone()).send().await.is_ok() {
while client.get(url.clone()).send().await.is_err() {
sleep(Duration::from_millis(100)).await
}
})