From 9b98d35f26c29665bb9b851c32d2c156d8168c94 Mon Sep 17 00:00:00 2001 From: mStar aka a person <12024604-mstarongitlab@users.noreply.gitlab.com> Date: Mon, 1 Jan 2024 13:33:07 +0000 Subject: [PATCH] Fix: Config and CLI arguments are now public --- src/config.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config.rs b/src/config.rs index 317cb14..4659dce 100644 --- a/src/config.rs +++ b/src/config.rs @@ -23,12 +23,12 @@ const CPUS_RESERVED_FOR_SYSTEM: u32 = 2; #[derive(Debug)] pub struct Config { /// Path to the db for diesel to use - database_path: String, + pub database_path: String, /// Maximum number of workers to use /// A value of 0 makes stuff single-threaded - max_workers: u32, + pub max_workers: u32, /// Minimum number of workers to use - min_workers: u32, + pub min_workers: u32, } #[derive(Debug, Deserialize)] @@ -53,19 +53,19 @@ struct ConfigToml { pub struct CLIArguments { /// Path to the config file #[arg(default_value = "config.toml")] - config: PathBuf, + pub config: PathBuf, /// Maximum amount of workers to use. /// If not set, the max is calculated depending on system resources. /// A value of 0 will cause the server to be singlethreaded, potentially reducing the performance and responsiveness by a lot #[arg(long)] - max_workers: Option, + pub max_workers: Option, /// Minimum amount of workers to keep active at all times /// Can potentially increase reaction speed at the cost of resource usage #[arg(long)] - min_workers: Option, + pub min_workers: Option, #[arg(long)] - db_path: Option, + pub db_path: Option, } pub fn read_from_env() -> Result {