16 lines
402 B
Rust
16 lines
402 B
Rust
|
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)
|
||
|
}
|
||
|
}
|