diff options
author | fxqnlr <[email protected]> | 2024-09-04 15:08:55 +0200 |
---|---|---|
committer | fxqnlr <[email protected]> | 2024-09-04 15:08:55 +0200 |
commit | 11e64fc7560de3cd0def718edf68c31e3dc8be72 (patch) | |
tree | f14ad1eb3d349e1f95e4d69c251e79ac85786a64 /src/data/list.rs | |
parent | 7a85cf311c85ab45c75098dae58b5ebf5fef60bc (diff) | |
download | modlist-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.rs | 19 |
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 @@ | |||
1 | use crate::{config::Cfg, db::{config_get_current_list, lists_get}, error::MLE}; | ||
2 | |||
3 | use super::modloader::Modloader; | ||
4 | |||
5 | #[derive(Debug, Clone, PartialEq, Eq)] | ||
6 | pub struct List { | ||
7 | pub id: String, | ||
8 | pub mc_version: String, | ||
9 | pub modloader: Modloader, | ||
10 | pub download_folder: String, | ||
11 | } | ||
12 | |||
13 | impl 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 | } | ||