summaryrefslogtreecommitdiff
path: root/src/data/list.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2024-09-04 15:08:55 +0200
committerfxqnlr <[email protected]>2024-09-04 15:08:55 +0200
commit11e64fc7560de3cd0def718edf68c31e3dc8be72 (patch)
treef14ad1eb3d349e1f95e4d69c251e79ac85786a64 /src/data/list.rs
parent7a85cf311c85ab45c75098dae58b5ebf5fef60bc (diff)
downloadmodlist-11e64fc7560de3cd0def718edf68c31e3dc8be72.tar
modlist-11e64fc7560de3cd0def718edf68c31e3dc8be72.tar.gz
modlist-11e64fc7560de3cd0def718edf68c31e3dc8be72.zip
move stuff around, remove lib.rs for overview
Diffstat (limited to 'src/data/list.rs')
-rw-r--r--src/data/list.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/data/list.rs b/src/data/list.rs
new file mode 100644
index 0000000..0045b7a
--- /dev/null
+++ b/src/data/list.rs
@@ -0,0 +1,19 @@
1use crate::{config::Cfg, db::{config_get_current_list, lists_get}, error::MLE};
2
3use super::modloader::Modloader;
4
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub struct List {
7 pub id: String,
8 pub mc_version: String,
9 pub modloader: Modloader,
10 pub download_folder: String,
11}
12
13impl List {
14 /// # Errors
15 pub fn get_current_list(config: &Cfg) -> MLE<List> {
16 let id = config_get_current_list(config)?;
17 lists_get(config, &id)
18 }
19}