style: remove redundant code narration

This commit is contained in:
objz committed 2026-10-01 13:53:12 +02:00
1 parent 495f31778b
commit 783fb76f06
115 files changed
+19 -746

No files matched your search

-3
View File
@@ -1,9 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// fabric installation. the nice one: just fetch a profile json and download
// the libraries. no java installer nonsense required.
use std::path::Path;
use async_trait::async_trait;
+2 -7
View File
@@ -1,9 +1,8 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// forge installation. modern forge runs a java installer, old forge (pre-1.13)
// can't run headless so we extract the profile and libraries from the jar
// directly. the installer jar gets cleaned up either way.
// Old Forge installers cannot run headless, so their profiles and libraries
// must be extracted from the jar instead.
use std::path::Path;
@@ -85,7 +84,6 @@ impl ModLoaderInstaller for ForgeInstaller {
let profile_filename = format!("forge-{game_version}-{loader_version}.json");
if has_legacy_install_profile(&installer_jar) {
// old forge: no --installClient support, extract directly from jar
tracing::debug!("Forge installer uses legacy install_profile.json path");
if let Err(e) =
install_forge_from_profile(client, &installer_jar, meta_dir, &profile_filename)
@@ -95,7 +93,6 @@ impl ModLoaderInstaller for ForgeInstaller {
return Err(e);
}
} else {
// modern forge: run the java installer
let java_path = java_path.map(str::to_owned).unwrap_or_else(|| {
crate::config::SETTINGS
.read()
@@ -110,7 +107,6 @@ impl ModLoaderInstaller for ForgeInstaller {
return Err(InstallError::Installer(e));
}
// extract the profile from what the installer just wrote to disk
save_forge_profile(instance_dir, meta_dir, game_version, loader_version)
.map_err(InstallError::Installer)?;
}
@@ -271,7 +267,6 @@ pub(crate) async fn install_forge_from_profile(
InstallError::Installer(InstallerError::Profile("missing install.path".into()))
})?;
// extract the universal jar to the correct maven location
let universal_maven_path = crate::instance::loader::maven::maven_coord_to_path(
install_path_coord,
)
-2
View File
@@ -1,8 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// maven coordinate handling shared by loader installation and launch profiles.
#[must_use]
pub fn maven_coord_to_path(coord: &str) -> Option<String> {
let parts: Vec<&str> = coord.split(':').collect();
+1 -7
View File
@@ -1,11 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// mod loader installation. each loader (fabric, forge, neoforge, quilt, vanilla)
// implements the same trait so the UI can treat them uniformly: pick game version,
// pick loader version, install. the actual installation strategies differ wildly
// though (fabric/quilt just download jars, forge/neoforge run a whole java installer).
mod fabric;
pub mod forge;
pub mod maven;
@@ -83,8 +78,7 @@ pub trait ModLoaderInstaller: Send + Sync {
}
}
// writes raw profile JSON bytes to meta_dir/loader-profiles/<filename>.
// callers that already have the upstream bytes (fabric/quilt http fetch,
// Callers that already have the upstream bytes (fabric/quilt http fetch,
// legacy forge versionInfo extract) use this directly to keep the on-disk
// file byte-for-byte identical to the source.
pub(crate) fn save_profile_bytes(
-3
View File
@@ -1,9 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// neoforge installation. same java installer dance as forge (they forked from it,
// after all), just with different URLs and version naming.
use std::path::Path;
use async_trait::async_trait;
-3
View File
@@ -1,9 +1,6 @@
// SPDX-FileCopyrightText: 2026 Constantin Bauer
// SPDX-License-Identifier: GPL-3.0-only
// quilt installation. same clean approach as fabric (profile json + library
// downloads). they're basically fabric's cooler sibling.
use std::path::Path;
use async_trait::async_trait;