git-next/crates/config/src/forge_name.rs

16 lines
402 B
Rust
Raw Normal View History

use std::path::PathBuf;
/// The name of a Forge to connect to
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ForgeName(pub String);
impl std::fmt::Display for ForgeName {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
impl From<&ForgeName> for PathBuf {
fn from(value: &ForgeName) -> Self {
Self::from(&value.0)
}
}