aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/core/maven.rs
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2026-01-18 12:24:29 +0800
committerGitHub <noreply@github.com>2026-01-18 12:24:29 +0800
commitfd00ac6878b2cee9337b9e92d0c990ecdce9a346 (patch)
treebb5540f763dc0061877c9d9ac53747d79193eecc /src-tauri/src/core/maven.rs
parentad36e0ce82770f9b3509ddb1cf96bc3422969806 (diff)
parent6d82ab2275130f3bafdb7ec664297eb700321526 (diff)
downloadDropOut-fd00ac6878b2cee9337b9e92d0c990ecdce9a346.tar.gz
DropOut-fd00ac6878b2cee9337b9e92d0c990ecdce9a346.zip
Merge pull request #58 from HsiangNianian/main
Diffstat (limited to 'src-tauri/src/core/maven.rs')
-rw-r--r--src-tauri/src/core/maven.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src-tauri/src/core/maven.rs b/src-tauri/src/core/maven.rs
index 8c89768..760e68b 100644
--- a/src-tauri/src/core/maven.rs
+++ b/src-tauri/src/core/maven.rs
@@ -8,6 +8,7 @@
use std::path::PathBuf;
/// Known Maven repository URLs for mod loaders
+#[allow(dead_code)]
pub const MAVEN_CENTRAL: &str = "https://repo1.maven.org/maven2/";
pub const FABRIC_MAVEN: &str = "https://maven.fabricmc.net/";
pub const FORGE_MAVEN: &str = "https://maven.minecraftforge.net/";
@@ -114,7 +115,7 @@ impl MavenCoordinate {
///
/// # Returns
/// The full path where the library should be stored
- pub fn to_local_path(&self, libraries_dir: &PathBuf) -> PathBuf {
+ pub fn to_local_path(&self, libraries_dir: &std::path::Path) -> PathBuf {
let rel_path = self.to_path();
libraries_dir.join(rel_path.replace('/', std::path::MAIN_SEPARATOR_STR))
}
@@ -183,7 +184,7 @@ pub fn resolve_library_url(
///
/// # Returns
/// The path where the library should be stored
-pub fn get_library_path(name: &str, libraries_dir: &PathBuf) -> Option<PathBuf> {
+pub fn get_library_path(name: &str, libraries_dir: &std::path::Path) -> Option<PathBuf> {
let coord = MavenCoordinate::parse(name)?;
Some(coord.to_local_path(libraries_dir))
}