From 8ed942a50137f1932500fa4cd64d1484600fb3d8 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 11 Apr 2024 23:03:15 +0100 Subject: [PATCH] fix: remove extra StartRepo message Closes kemitix/git-next#32 --- Cargo.toml | 2 +- src/server/actors/repo/branch.rs | 2 -- src/server/actors/repo/mod.rs | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 74d130c..83cbed1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "git-next" -version = "0.1.1" +version = "0.1.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/server/actors/repo/branch.rs b/src/server/actors/repo/branch.rs index 257192a..b54a00d 100644 --- a/src/server/actors/repo/branch.rs +++ b/src/server/actors/repo/branch.rs @@ -158,7 +158,6 @@ pub async fn advance_main( next: forge::Commit, repo_details: config::RepoDetails, repo_config: config::RepoConfig, - addr: Addr, ) { match reset( &repo_config.branches().main(), @@ -168,7 +167,6 @@ pub async fn advance_main( ) { Ok(_) => { info!("Success"); - addr.do_send(StartRepo); } Err(err) => { warn!(?err, "Failed") diff --git a/src/server/actors/repo/mod.rs b/src/server/actors/repo/mod.rs index 5718e91..c8c7a1e 100644 --- a/src/server/actors/repo/mod.rs +++ b/src/server/actors/repo/mod.rs @@ -159,8 +159,7 @@ impl Handler for RepoActor { warn!("No config loaded"); return; }; - let addr = ctx.address(); - branch::advance_main(msg.0, repo_details, repo_config, addr) + branch::advance_main(msg.0, repo_details, repo_config) .into_actor(self) .wait(ctx); }