chore: Lint

This commit is contained in:
LynithDev 2024-12-08 15:11:05 +01:00
parent a0e5287720
commit 2bdfd50e36
6 changed files with 8 additions and 12 deletions

View file

@ -180,7 +180,7 @@ function ClusterCard(props: Cluster) {
return (
<>
<div
class="group border-border/05 relative h-[152px] flex flex-col border rounded-xl bg-component-bg active:bg-component-bg-pressed hover:bg-component-bg-hover"
class="group relative h-[152px] flex flex-col border border-border/05 rounded-xl bg-component-bg active:bg-component-bg-pressed hover:bg-component-bg-hover"
onClick={e => openClusterPage(e)}
>
<div class="relative flex-1 overflow-hidden rounded-t-xl">

View file

@ -1,6 +1,5 @@
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
transformerDirectives,

View file

@ -67,7 +67,7 @@ pub async fn create_unfinished_cluster(
State::sync().await?;
let state = State::get().await?;
let mut packages = state.packages.write().await;
packages.add_cluster(cluster.cluster_path()).await;
packages.add_cluster(cluster.cluster_path());
Ok(cluster.cluster_path())
}
@ -173,7 +173,7 @@ pub async fn create_cluster(
State::sync().await?;
let state = State::get().await?;
let mut packages = state.packages.write().await;
packages.add_cluster(cluster.cluster_path()).await;
packages.add_cluster(cluster.cluster_path());
Ok(cluster.cluster_path())
}

View file

@ -351,7 +351,7 @@ impl Into<ManagedVersion> for ModFile {
featured: false,
is_available: self.is_available && files.len() > 0,
files,
game_versions: game_versions,
game_versions,
published: Some(self.file_date),
version_display: self.display_name,
version_type: self.release_type.into(),

View file

@ -205,13 +205,13 @@ impl Packages {
// TODO: This should probably not clone and store the cluster path in like 2 areas
for cluster_path in clusters.0.keys() {
this.add_cluster(cluster_path.clone()).await;
this.add_cluster(cluster_path.clone());
}
this
}
pub async fn add_cluster(&mut self, cluster_path: ClusterPath) {
pub fn add_cluster(&mut self, cluster_path: ClusterPath) {
let mgr = PackageManager::new(cluster_path.clone());
self.managers.insert(cluster_path, mgr);
}

View file

@ -15,12 +15,9 @@ pub fn request_start_for_wrapper(pid: u32) -> Result<(), String> {
if result == 0 {
Ok(())
} else {
Err(format!(
"failed to request gamemode for pid {}: {}",
pid, result
))
Err(format!("failed to request gamemode for pid {pid}: {result}"))
}
},
Err(e) => Err(format!("failed to request gamemode for pid {}: {}", pid, e)),
Err(e) => Err(format!("failed to request gamemode for pid {pid}: {e}")),
}
}