[REFACTOR] Simplify match arms
@@ -1080,8 +1080,9 @@ impl Manager {
// TODO (CM): eventually, make this a future receiver
for action in action_receiver.try_iter() {
+ use SupervisorAction::*;
match action {
- SupervisorAction::StopService { mut service_spec,
+ StopService { mut service_spec,
shutdown_input, } => {
service_spec.desired_state = DesiredState::Down;
if let Err(err) = self.state.cfg.save_spec_for(&service_spec) {
@@ -1090,7 +1091,7 @@ impl Manager {
}
self.stop_service_gsw_msw(&service_spec.ident, &shutdown_input);
}
- SupervisorAction::UnloadService { service_spec,
+ UnloadService { service_spec,
shutdown_input, } => {
self.remove_spec_file(&service_spec.ident).ok();
self.stop_service_gsw_msw(&service_spec.ident, &shutdown_input);
