diff options
| author | 2026-01-18 12:24:29 +0800 | |
|---|---|---|
| committer | 2026-01-18 12:24:29 +0800 | |
| commit | fd00ac6878b2cee9337b9e92d0c990ecdce9a346 (patch) | |
| tree | bb5540f763dc0061877c9d9ac53747d79193eecc /src-tauri/src/core/maven.rs | |
| parent | ad36e0ce82770f9b3509ddb1cf96bc3422969806 (diff) | |
| parent | 6d82ab2275130f3bafdb7ec664297eb700321526 (diff) | |
| download | DropOut-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.rs | 5 |
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)) } |