forked from kemitix/git-next
feat(config): make RepoDetails Clone
This commit is contained in:
parent
77705035f9
commit
a4e781d4e4
1 changed files with 8 additions and 2 deletions
|
@ -87,25 +87,28 @@ impl Display for Repo {
|
|||
write!(f, "{} - {}", self.repo, self.branch)
|
||||
}
|
||||
}
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct ForgeName(pub String);
|
||||
impl Display for ForgeName {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct Hostname(pub String);
|
||||
impl Display for Hostname {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct User(pub String);
|
||||
impl Display for User {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct ForgeDetails {
|
||||
pub name: ForgeName,
|
||||
pub forge_type: ForgeType,
|
||||
|
@ -124,25 +127,28 @@ impl From<(&ForgeName, &Forge)> for ForgeDetails {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct RepoName(pub String);
|
||||
impl Display for RepoName {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct RepoPath(pub String);
|
||||
impl Display for RepoPath {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct BranchName(pub String);
|
||||
impl Display for BranchName {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct RepoDetails {
|
||||
pub name: RepoName,
|
||||
pub repo: RepoPath,
|
||||
|
|
Loading…
Reference in a new issue