From 11e64fc7560de3cd0def718edf68c31e3dc8be72 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Wed, 4 Sep 2024 15:08:55 +0200 Subject: move stuff around, remove lib.rs for overview --- src/commands/modification.rs | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) (limited to 'src/commands/modification.rs') diff --git a/src/commands/modification.rs b/src/commands/modification.rs index 8f115ee..d20f575 100644 --- a/src/commands/modification.rs +++ b/src/commands/modification.rs @@ -3,44 +3,13 @@ use std::collections::HashMap; use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; use crate::{ - config::Cfg, - db::{ + apis::modrinth::{extract_current_version, get_raw_versions, project, projects, versions, Version}, config::Cfg, data::{modification::{AddMod, IDSelector}, project::ProjectInfo}, db::{ lists_get_all_ids, mods_get_id, mods_get_info, mods_insert, mods_remove, userlist_get_all_ids, userlist_get_current_version, userlist_insert, userlist_remove, - }, - error::{EType, MLErr, MLE}, - files::{delete_version, download_versions}, - modrinth::{ - extract_current_version, get_raw_versions, project, projects, versions, - Version, - }, - List, PROGRESS_CHARS, STYLE_BAR_POS, STYLE_OPERATION, + }, error::{EType, MLErr, MLE}, files::{delete_version, download_versions}, List, PROGRESS_CHARS, STYLE_BAR_POS, STYLE_OPERATION }; -#[derive(Debug)] -pub struct AddMod { - pub id: IDSelector, - pub set_version: bool, -} - -#[derive(Debug, PartialEq, Eq)] -pub enum IDSelector { - ModificationID(String), - VersionID(String), -} - -#[derive(Debug, Clone)] -pub struct ProjectInfo { - pub mod_id: String, - pub slug: String, - pub title: String, - pub current_version: Option, - pub applicable_versions: Vec, - pub download_link: String, - pub set_version: bool, -} - /// # Errors pub async fn mod_add( config: &Cfg, -- cgit v1.2.3