From 2072a38066245c04ba5bae9c34e17943fc91692e Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Sat, 28 Dec 2024 18:07:56 +0300 Subject: [PATCH] dont debug secrets --- src/config.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 199d6cb..0cdf6c4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -39,13 +39,22 @@ impl Default for Config { } } -#[derive(Serialize, Deserialize, Debug)] +#[derive(Serialize, Deserialize)] pub struct RepoConfig { pub url: String, pub path: PathBuf, pub secret: Option, } +impl std::fmt::Debug for RepoConfig { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("RepoConfig") + .field("url", &self.url) + .field("path", &self.path) + .finish() + } +} + fn default_header_name() -> String { "authorization".into() }