1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
use derive_more::{Constructor, Display};

use crate::{Hostname, RepoPath};

#[derive(Clone, Debug, PartialEq, Eq, Constructor, Display)]
#[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
    }
}