From dc4110596f9b4e2e2203935c048b3ae94a4f38f2 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 7 Apr 2024 18:36:27 +0100 Subject: [PATCH] feat(config): implement Display for ForgeType --- src/server/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/config.rs b/src/server/config.rs index 1f20c07..2525eae 100644 --- a/src/server/config.rs +++ b/src/server/config.rs @@ -1,3 +1,5 @@ +use std::fmt::{Display, Formatter}; + use serde::Deserialize; use terrors::OneOf; @@ -20,6 +22,12 @@ pub enum ForgeType { // GitLab, // BitBucket, } +impl Display for ForgeType { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self) + } +} + #[allow(dead_code)] impl Config { pub(crate) fn load(fs: &FileSystem) -> Result> {