🐛 fix: format

Signed-off-by: Pauline <git@ethanlibs.co>
This commit is contained in:
Pauline 2024-08-17 21:44:21 +02:00
parent 9b57bc1f24
commit 62184abf1b
No known key found for this signature in database
GPG key ID: 722BB181973296AE
3 changed files with 6 additions and 9 deletions

View file

@ -233,7 +233,7 @@ pub async fn generate_pack_from_version_id(
.first()
.map(|file| (file.url.clone(), file.hashes.get("sha1")))
}
.ok_or_else(|| { anyhow::anyhow!("specified version has no files") })?;
.ok_or_else(|| anyhow::anyhow!("specified version has no files"))?;
let file = fetch_advanced(
Method::GET,

View file

@ -292,12 +292,9 @@ pub async fn remove_all_related_files(
.into_values()
.map(|p| p.package_id)
.collect::<Vec<_>>();
let cluster = cluster::get(&cluster_path, None).await?.ok_or_else(||
anyhow::anyhow!(
"{} is an unmanaged cluster!",
cluster_path.to_string()
)
)?;
let cluster = cluster::get(&cluster_path, None).await?.ok_or_else(|| {
anyhow::anyhow!("{} is an unmanaged cluster!", cluster_path.to_string())
})?;
for (package_id, package) in &cluster.packages {
if let PackageMetadata::Managed { package, .. } = &package.meta {
if to_remove.contains(&package.id) {

View file

@ -192,12 +192,12 @@ pub async fn install_minecraft(
false,
)?)
.await?
.ok_or_else(||
.ok_or_else(|| {
anyhow::anyhow!(
"failed to find processor main class for {}",
processor.jar
)
)?,
})?,
)
.args(arguments::processor_arguments(
&libraries,