Skip to content

Commit

Permalink
Simplify expression
Browse files Browse the repository at this point in the history
  • Loading branch information
runesoerensen committed Nov 11, 2024
1 parent ed41abb commit 03dc8ac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions buildpacks/dotnet/src/layers/nuget_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(crate) fn handle(
},
})?;

let log_message = match nuget_cache_layer.state {
if let Some(message) = match nuget_cache_layer.state {
LayerState::Restored { .. } => Some("Reusing package cache".to_string()),
LayerState::Empty { cause } => match cause {
EmptyLayerCause::NewlyCreated => None,
Expand All @@ -63,9 +63,7 @@ pub(crate) fn handle(
Some(format!("Clearing package cache after {count} uses"))
}
},
};

if let Some(message) = log_message {
} {
log = log.bullet("NuGet cache").sub_bullet(message).done();
}
Ok((nuget_cache_layer, log))
Expand Down

0 comments on commit 03dc8ac

Please sign in to comment.