From 5ddb6b3b75a399e63c52c82293e8286967c235e4 Mon Sep 17 00:00:00 2001 From: Neshura Date: Sun, 17 Dec 2023 14:43:00 +0100 Subject: [PATCH] Switch of several config attributes to pub(crate) --- src/config/mod.rs | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index 446e43b..14af0cc 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1,12 +1,13 @@ use std::{error::Error}; use serde_derive::{Deserialize, Serialize}; +use crate::config::PostBody::Description; #[derive(Serialize, Deserialize, Clone)] pub(crate) struct Config { - instance: String, - status_post_url: Option, - config_reload_seconds: u32, - series: Vec, + pub(crate) instance: String, + pub(crate) status_post_url: Option, + pub(crate) config_reload_seconds: u32, + pub(crate) series: Vec, } impl Config { @@ -40,26 +41,26 @@ impl Default for Config { #[derive(Debug, Serialize, Deserialize, Clone)] pub(crate) struct SeriesConfig { - slug: String, - parted: bool, - prepub_community: PostConfig, - volume_community: PostConfig, + pub(crate) slug: String, + pub(crate) parted: bool, + pub(crate) prepub_community: PostConfig, + pub(crate) volume_community: PostConfig, } #[derive(Debug, Serialize, Deserialize, Clone)] pub(crate) struct PostConfig { - community_name: String, - pin_settings: PinConfig, - post_body: PostBody, + pub(crate) community_name: String, + pub(crate) pin_settings: PinConfig, + pub(crate) post_body: PostBody, } #[derive(Debug, Serialize, Deserialize, Clone)] pub(crate) struct PinConfig { - pin_new_post_local: bool, - pin_new_post_community: bool, + pub(crate) pin_new_post_local: bool, + pub(crate) pin_new_post_community: bool, } -#[derive(Debug, Serialize, Deserialize, Clone)] +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(tag = "body_type", content = "body_content")] pub(crate) enum PostBody { None,