diff options
| author | 2026-01-14 16:44:56 +0800 | |
|---|---|---|
| committer | 2026-01-14 16:44:56 +0800 | |
| commit | 9193112aca842dbe4d723aa865a7a30f3bcdb691 (patch) | |
| tree | 226a595587569c4a4ddb42729163060f4e04dc18 /src-tauri/src/core/maven.rs | |
| parent | bdbed80e0ee632a6495244b0a56f74ed6f9d639e (diff) | |
| download | DropOut-9193112aca842dbe4d723aa865a7a30f3bcdb691.tar.gz DropOut-9193112aca842dbe4d723aa865a7a30f3bcdb691.zip | |
refactor: clean up formatting and improve readability in core modules
Diffstat (limited to 'src-tauri/src/core/maven.rs')
| -rw-r--r-- | src-tauri/src/core/maven.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src-tauri/src/core/maven.rs b/src-tauri/src/core/maven.rs index a930e05..8c89768 100644 --- a/src-tauri/src/core/maven.rs +++ b/src-tauri/src/core/maven.rs @@ -101,7 +101,10 @@ impl MavenCoordinate { } }; - format!("{}/{}/{}/{}", group_path, self.artifact, self.version, filename) + format!( + "{}/{}/{}/{}", + group_path, self.artifact, self.version, filename + ) } /// Get the local file path for storing this artifact. @@ -142,7 +145,11 @@ impl MavenCoordinate { /// /// # Returns /// The resolved download URL -pub fn resolve_library_url(name: &str, explicit_url: Option<&str>, maven_url: Option<&str>) -> Option<String> { +pub fn resolve_library_url( + name: &str, + explicit_url: Option<&str>, + maven_url: Option<&str>, +) -> Option<String> { // If there's an explicit URL, use it if let Some(url) = explicit_url { return Some(url.to_string()); @@ -156,7 +163,9 @@ pub fn resolve_library_url(name: &str, explicit_url: Option<&str>, maven_url: Op // Guess the repository based on group if coord.group.starts_with("net.fabricmc") { FABRIC_MAVEN - } else if coord.group.starts_with("net.minecraftforge") || coord.group.starts_with("cpw.mods") { + } else if coord.group.starts_with("net.minecraftforge") + || coord.group.starts_with("cpw.mods") + { FORGE_MAVEN } else { MOJANG_LIBRARIES |