fix all the red wiggly wiggles

This commit is contained in:
leocth
2022-02-20 22:47:44 +08:00
parent 14e8e92f46
commit 28d1267afa
8 changed files with 56 additions and 59 deletions

View File

@@ -33,6 +33,16 @@ pub struct Modpack {
}
impl Modpack {
pub fn new(game: ModpackGame, version: &str, name: &str, summary: Option<&str>) -> Self {
Self {
game,
version: String::from(version),
name: String::from(name),
summary: summary.map(String::from),
files: HashSet::new(),
}
}
/// Download a modpack's files for a given side to a given destination
/// Assumes the destination exists and is a directory
pub async fn download_files(&self, dest: &Path, side: ModpackSide) -> ModpackResult<()> {
@@ -49,16 +59,6 @@ impl Modpack {
Ok(())
}
pub fn new(game: ModpackGame, version: &str, name: &str, summary: Option<&str>) -> Self {
Self {
game,
version: String::from(version),
name: String::from(name),
summary: summary.map(String::from),
files: HashSet::new(),
}
}
pub async fn add_project(
&mut self,
project: &str,