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

14 lines
325 B
Rust
Raw Normal View History

2024-06-09 10:21:09 +01:00
use derive_more::Display;
/// The name of a Branch
2024-06-09 10:21:09 +01:00
#[derive(Clone, Default, Debug, Hash, PartialEq, Eq, Display, PartialOrd, Ord)]
pub struct BranchName(String);
impl BranchName {
pub fn new(str: impl Into<String>) -> Self {
Self(str.into())
}
pub fn into_string(self) -> String {
self.0
}
}