git-next/crates/core/src/git/git_remote.rs

22 lines
442 B
Rust
Raw Normal View History

//
use derive_more::{Constructor, Display};
use crate::{Hostname, RepoPath};
#[derive(Clone, Debug, PartialEq, Eq, Constructor, Display)]
2024-05-14 16:28:17 +01:00
#[display("{}:{}", host, repo_path)]
pub struct GitRemote {
host: Hostname,
repo_path: RepoPath,
}
#[cfg(test)]
impl GitRemote {
pub(crate) const fn host(&self) -> &Hostname {
&self.host
}
pub(crate) const fn repo_path(&self) -> &RepoPath {
&self.repo_path
}
}