blob: b886af13a02071c7902ee857d2dde5cdee508a97 (
plain) (
tree)
|
|
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<List> {
let id = config_get_current_list(config)?;
Ok(lists_get(config, &id)?)
}
}
|