git-next-core 0.14.1

core for git-next, the trunk-based development manager
Documentation
use crate::config::BranchName;

/// Mapped from `.git-next.toml` file at `branches`
#[derive(
    Clone,
    Hash,
    Debug,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    serde::Deserialize,
    serde::Serialize,
    derive_more::Constructor,
    derive_more::Display,
)]
#[display("{},{},{}", main, next, dev)]
pub struct RepoBranches {
    main: String,
    next: String,
    dev: String,
}
impl RepoBranches {
    #[must_use]
    pub fn main(&self) -> BranchName {
        BranchName::new(&self.main)
    }

    #[must_use]
    pub fn next(&self) -> BranchName {
        BranchName::new(&self.next)
    }

    #[must_use]
    pub fn dev(&self) -> BranchName {
        BranchName::new(&self.dev)
    }
}