diff --git a/src/server/actors/repo.rs b/src/server/actors/repo.rs index 27e5416..2f2f946 100644 --- a/src/server/actors/repo.rs +++ b/src/server/actors/repo.rs @@ -4,7 +4,12 @@ use tracing::info; use crate::server::config::RepoDetails; pub struct RepoActor { - pub details: RepoDetails, + details: RepoDetails, +} +impl RepoActor { + pub(crate) const fn new(details: RepoDetails) -> Self { + Self { details } + } } impl Actor for RepoActor { type Context = Context; diff --git a/src/server/mod.rs b/src/server/mod.rs index fbd1fb8..ddd894c 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -57,9 +57,12 @@ pub fn start(fs: FileSystem) { let span = tracing::info_span!("Repo", %repo_name, %repo); let _guard = span.enter(); info!("Creating Repo"); - let actor = actors::repo::RepoActor { - details: config::RepoDetails::new(&repo_name, repo, &forge_name, forge), - }; + let actor = actors::repo::RepoActor::new(config::RepoDetails::new( + &repo_name, + repo, + &forge_name, + forge, + )); actors.push((forge_name.clone(), repo_name, actor)); info!("Created Repo"); });