From 3c4a0d52b1653aa14828fcff1591f669ad88023f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 8 Apr 2024 11:48:35 +0100 Subject: [PATCH] feat(config): Add ApiToken newtype --- src/server/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/server/config.rs b/src/server/config.rs index 42c04d5b..96a4827e 100644 --- a/src/server/config.rs +++ b/src/server/config.rs @@ -127,6 +127,13 @@ impl Display for User { } } #[derive(Clone, Debug, PartialEq, Eq)] +pub struct ApiToken(pub String); +impl Display for ApiToken { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} +#[derive(Clone, Debug, PartialEq, Eq)] pub struct ForgeDetails { pub name: ForgeName, pub forge_type: ForgeType,