git-next/crates/git/src/git_remote.rs
Paul Campbell eb7d14bc33
All checks were successful
/ test (push) Successful in 2s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
refactor(git): more derive_more replacing boilerplate
2024-05-15 20:40:25 +01:00

16 lines
405 B
Rust

use git_next_config::{Hostname, RepoPath};
#[derive(Clone, Debug, PartialEq, Eq, derive_more::Constructor, derive_more::Display)]
#[display("{}:{}", host, repo_path)]
pub struct GitRemote {
host: Hostname,
repo_path: RepoPath,
}
impl GitRemote {
pub const fn host(&self) -> &Hostname {
&self.host
}
pub const fn repo_path(&self) -> &RepoPath {
&self.repo_path
}
}