diff --git a/src/setup/runnable.rs b/src/setup/runnable.rs index 5c3a1c3..add3f49 100644 --- a/src/setup/runnable.rs +++ b/src/setup/runnable.rs @@ -32,6 +32,7 @@ where macro_rules! runnable_for_tuple { ( $($name:ident)* ) => ( + #[allow(clippy::let_unit_value)] #[async_trait(?Send)] #[allow(non_snake_case)] impl<$($name: Symbol + Debug,)*> Runnable for ($($name,)*) { @@ -117,7 +118,7 @@ mod test { async fn run_symbol( &self, symbol: &S, - logger: &L, + _logger: &L, force: bool, ) -> Result> { let run = force || !symbol.target_reached().await?; diff --git a/src/setup/setup.rs b/src/setup/setup.rs index 4efd0ab..842152b 100644 --- a/src/setup/setup.rs +++ b/src/setup/setup.rs @@ -201,7 +201,7 @@ mod test { async fn run_symbol( &self, symbol: &S, - logger: &L, + _logger: &L, force: bool, ) -> Result> { let run = force || !symbol.target_reached().await?; @@ -239,7 +239,7 @@ mod test { #[derive(Clone)] struct Artifacts; impl FromArtifact> for Artifacts { - fn from_artifact(from: ()) -> Self { + fn from_artifact(_from: ()) -> Self { Self } fn into_artifact(self) -> () { diff --git a/src/symbols/git/checkout.rs b/src/symbols/git/checkout.rs index e2ad4a5..14593ba 100644 --- a/src/symbols/git/checkout.rs +++ b/src/symbols/git/checkout.rs @@ -63,7 +63,12 @@ impl, P: AsRef, S: AsRef, B: AsRef Result<(), Box> { - if !self.target.as_ref().exists() { + if self.target.as_ref().exists() { + self + .run_git(&["fetch", self.source.as_ref(), self.branch.as_ref()]) + .await?; + self.run_git(&["merge", "FETCH_HEAD"]).await?; + } else { self .command_runner .borrow() @@ -80,11 +85,6 @@ impl, P: AsRef, S: AsRef, B: AsRef ToArtifact for Option { + // FIXME: https://github.com/rust-lang/rust-clippy/issues/2843 + #![allow(clippy::use_self)] type Artifact = Option; }