diff --git a/src/config.rs b/src/config.rs index e9106b4..677e49a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -26,6 +26,24 @@ impl core::fmt::Display for Error{ impl std::error::Error for Error {} +#[derive(Debug, Default)] +#[cfg_attr(test, derive(PartialEq))] +struct PartialConfig { + project_path: Option, + gitea_url: Option, + owner: Option, + repo: Option, + token: Option, +} + +#[derive(Debug, Default)] +#[cfg_attr(test, derive(PartialEq))] +struct WholeFile { + all: PartialConfig, + project_overrides: Vec, +} + + /// The outer value must be a Table so we can get the sub-table from it. fn get_table<'outer>(outer: &'outer Table, table_name: impl ToString) -> Result<&'outer Table> { Ok(outer