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)
|
write!(f, "{} - {}", self.repo, self.branch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub struct ForgeName(pub String);
|
pub struct ForgeName(pub String);
|
||||||
impl Display for ForgeName {
|
impl Display for ForgeName {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "{}", self.0)
|
write!(f, "{}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub struct Hostname(pub String);
|
pub struct Hostname(pub String);
|
||||||
impl Display for Hostname {
|
impl Display for Hostname {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "{}", self.0)
|
write!(f, "{}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub struct User(pub String);
|
pub struct User(pub String);
|
||||||
impl Display for User {
|
impl Display for User {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "{}", self.0)
|
write!(f, "{}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub struct ForgeDetails {
|
pub struct ForgeDetails {
|
||||||
pub name: ForgeName,
|
pub name: ForgeName,
|
||||||
pub forge_type: ForgeType,
|
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);
|
pub struct RepoName(pub String);
|
||||||
impl Display for RepoName {
|
impl Display for RepoName {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "{}", self.0)
|
write!(f, "{}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub struct RepoPath(pub String);
|
pub struct RepoPath(pub String);
|
||||||
impl Display for RepoPath {
|
impl Display for RepoPath {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "{}", self.0)
|
write!(f, "{}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub struct BranchName(pub String);
|
pub struct BranchName(pub String);
|
||||||
impl Display for BranchName {
|
impl Display for BranchName {
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||||
write!(f, "{}", self.0)
|
write!(f, "{}", self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub struct RepoDetails {
|
pub struct RepoDetails {
|
||||||
pub name: RepoName,
|
pub name: RepoName,
|
||||||
pub repo: RepoPath,
|
pub repo: RepoPath,
|
||||||
|
|
Loading…
Reference in a new issue