diff options
Diffstat (limited to 'yt/src/config/mod.rs')
-rw-r--r-- | yt/src/config/mod.rs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/yt/src/config/mod.rs b/yt/src/config/mod.rs index ea40055..1aaf065 100644 --- a/yt/src/config/mod.rs +++ b/yt/src/config/mod.rs @@ -8,6 +8,8 @@ // You should have received a copy of the License along with this program. // If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +#![allow(clippy::module_name_repetitions)] + use std::path::PathBuf; use bytes::Bytes; @@ -17,7 +19,7 @@ mod default; mod definitions; pub mod file_system; -#[derive(Serialize)] +#[derive(Serialize, Debug)] pub struct Config { pub select: SelectConfig, pub watch: WatchConfig, @@ -25,24 +27,29 @@ pub struct Config { pub download: DownloadConfig, pub update: UpdateConfig, } -#[derive(Serialize)] +#[derive(Serialize, Debug)] +// This structure could get non-copy fields in the future. +// The same thing applies to all the other structures here. +#[allow(missing_copy_implementations)] pub struct UpdateConfig { pub max_backlog: u32, } -#[derive(Serialize)] +#[derive(Serialize, Debug)] +#[allow(missing_copy_implementations)] pub struct DownloadConfig { pub max_cache_size: Bytes, } -#[derive(Serialize)] +#[derive(Serialize, Debug)] pub struct SelectConfig { pub playback_speed: f64, pub subtitle_langs: String, } -#[derive(Serialize)] +#[derive(Serialize, Debug)] +#[allow(missing_copy_implementations)] pub struct WatchConfig { pub local_comments_length: usize, } -#[derive(Serialize)] +#[derive(Serialize, Debug)] pub struct PathsConfig { pub download_dir: PathBuf, pub mpv_config_path: PathBuf, |