From b125dfd03084fff47ab8e90d002c6699b762d998 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Tue, 1 Nov 2022 23:00:45 +0100 Subject: added list stuff + beginnings of mods --- src/config.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index a0dfbbe..ba1b46a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,18 +1,20 @@ use config::{Config, File, FileFormat}; use serde::Deserialize; -#[derive(Debug, Deserialize)] +#[derive(Debug, Clone,Deserialize)] pub struct Cfg { + pub data: String, pub apis: Apis, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Clone, Deserialize)] pub struct Apis { pub modrinth: String, } impl Cfg { pub fn init(path: &str) -> Self { + //TODO Error Handling Config::builder() .add_source(File::new(path, FileFormat::Ini)) .build() -- cgit v1.2.3