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 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<Self, OneOf<(std::io::Error, toml::de::Error)>> {