use crate::{config::Cfg, db::{config_get_current_list, lists_get}, errors::MLE}; use super::modloader::Modloader; #[derive(Debug, Clone, PartialEq, Eq)] pub struct List { pub id: String, pub mc_version: String, pub modloader: Modloader, pub download_folder: String, } impl List { /// # Errors pub fn get_current_list(config: &Cfg) -> MLE { let id = config_get_current_list(config)?; Ok(lists_get(config, &id)?) } }