25 lines
576 B
Rust
25 lines
576 B
Rust
use crate::BranchName;
|
|
|
|
/// Mapped from `.git-next.toml` file at `branches`
|
|
#[derive(
|
|
Clone, Debug, PartialEq, Eq, serde::Deserialize, derive_more::Constructor, derive_more::Display,
|
|
)]
|
|
#[display("{},{},{}", main, next, dev)]
|
|
pub struct RepoBranches {
|
|
main: String,
|
|
next: String,
|
|
dev: String,
|
|
}
|
|
impl RepoBranches {
|
|
pub fn main(&self) -> BranchName {
|
|
BranchName::new(&self.main)
|
|
}
|
|
|
|
pub fn next(&self) -> BranchName {
|
|
BranchName::new(&self.next)
|
|
}
|
|
|
|
pub fn dev(&self) -> BranchName {
|
|
BranchName::new(&self.dev)
|
|
}
|
|
}
|