From 5c7d50a8f571384693819b5ef50aea9315dd9e44 Mon Sep 17 00:00:00 2001 From: "programmer@kl.netlib.re" Date: Thu, 27 Oct 2022 22:51:02 +0200 Subject: [PATCH] clonable config --- src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index 0fbd51a..254e8ac 100644 --- a/src/config.rs +++ b/src/config.rs @@ -6,12 +6,12 @@ use std::path::{Path, PathBuf}; use crate::cli::Cli; -#[derive(Deserialize, Debug)] +#[derive(Clone, Deserialize, Debug)] pub struct Config { pub qbittorrent: ClientConfig, } -#[derive(Deserialize, Debug)] +#[derive(Clone, Deserialize, Debug)] pub struct ClientConfig { pub host: String, pub port: usize, @@ -19,7 +19,7 @@ pub struct ClientConfig { pub password: String, } -#[derive(Debug, Snafu)] +#[derive(Clone, Debug, Snafu)] pub enum ConfigError { #[snafu(display("Invalid configuration file format at: {path}"))] Config { source: toml::de::Error, path: String },