feat(config): implement Display for ForgeType

This commit is contained in:
Paul Campbell 2024-04-07 18:36:27 +01:00
parent cf10aa3912
commit dc4110596f

View file

@ -1,3 +1,5 @@
use std::fmt::{Display, Formatter};
use serde::Deserialize; use serde::Deserialize;
use terrors::OneOf; use terrors::OneOf;
@ -20,6 +22,12 @@ pub enum ForgeType {
// GitLab, // GitLab,
// BitBucket, // BitBucket,
} }
impl Display for ForgeType {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self)
}
}
#[allow(dead_code)] #[allow(dead_code)]
impl Config { impl Config {
pub(crate) fn load(fs: &FileSystem) -> Result<Self, OneOf<(std::io::Error, toml::de::Error)>> { pub(crate) fn load(fs: &FileSystem) -> Result<Self, OneOf<(std::io::Error, toml::de::Error)>> {