feat(config): impl Display for RepoDetails
This commit is contained in:
parent
e9685abf5f
commit
77705035f9
2 changed files with 16 additions and 4 deletions
|
@ -15,9 +15,6 @@ pub struct StartRepo;
|
|||
impl Handler<StartRepo> for RepoActor {
|
||||
type Result = ();
|
||||
fn handle(&mut self, _msg: StartRepo, _ctx: &mut Self::Context) -> Self::Result {
|
||||
info!(
|
||||
"Starting Repo: {} - {}",
|
||||
self.details.name.0, self.details.repo.0
|
||||
);
|
||||
info!(%self.details, "Starting Repo");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,6 +164,21 @@ impl RepoDetails {
|
|||
}
|
||||
}
|
||||
}
|
||||
impl Display for RepoDetails {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}/{} ({}): {}:{}/{} @ {}",
|
||||
self.forge.name,
|
||||
self.name,
|
||||
self.forge.forge_type,
|
||||
self.forge.hostname,
|
||||
self.forge.user,
|
||||
self.repo,
|
||||
self.branch,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize)]
|
||||
pub enum ForgeType {
|
||||
|
|
Loading…
Reference in a new issue