Skip to content

Commit c031be2

Browse files
Fix Rust code formatting
1 parent ee5a827 commit c031be2

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

devolutions-agent/src/updater/detect.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ pub(crate) fn get_installed_product_version(product: Product) -> Result<Option<D
2121
pub(crate) fn get_product_code(product: Product) -> Result<Option<Uuid>, UpdaterError> {
2222
match product {
2323
Product::Gateway => registry::get_product_code(GATEWAY_UPDATE_CODE).map_err(UpdaterError::WindowsRegistry),
24-
Product::HubService => registry::get_product_code(HUB_SERVICE_UPDATE_CODE).map_err(UpdaterError::WindowsRegistry),
24+
Product::HubService => {
25+
registry::get_product_code(HUB_SERVICE_UPDATE_CODE).map_err(UpdaterError::WindowsRegistry)
26+
}
2527
}
2628
}

devolutions-agent/src/updater/product_actions.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl ProductUpdateActions for ServiceUpdateActions {
137137
fn get_msiexec_install_params(&self) -> Vec<String> {
138138
// When performing update, we want to make sure the service startup mode is restored to the
139139
// previous state. (Installer sets Manual by default).
140-
140+
141141
// For products with a single primary service, check if it should be automatic
142142
if self.service_states.len() == 1 && self.service_states[0].startup_was_automatic {
143143
info!("Adjusting MSIEXEC parameters for {} service startup mode", self.product);
@@ -147,11 +147,7 @@ impl ProductUpdateActions for ServiceUpdateActions {
147147
// For Hub Service with multiple services, check if any PAM service should be automatic
148148
// (The MSI installer controls the main PAM service startup via P.SERVICESTART)
149149
if self.product == Product::HubService {
150-
if let Some(pam_state) = self
151-
.service_states
152-
.iter()
153-
.find(|s| s.exists && s.name.contains("PAM"))
154-
{
150+
if let Some(pam_state) = self.service_states.iter().find(|s| s.exists && s.name.contains("PAM")) {
155151
if pam_state.startup_was_automatic {
156152
info!("Adjusting MSIEXEC parameters for Hub PAM service startup mode");
157153
return vec!["P.SERVICESTART=Automatic".to_owned()];

0 commit comments

Comments
 (0)