make clippy happy for handle in catalog middleware
@@ -27,9 +27,8 @@ impl<T: Environment> CatalogMiddleware<T> {
}
impl<T> Handler for CatalogMiddleware<T> where T: Environment {
fn handle(&self, action: &Action, emit: Rc<DispatcherFn>) {
- match action {
// @TODO: match on CatalogLoad in particular
- Action::WithAddons(addons, _) => {
+ if let Action::WithAddons(addons, _) = action {
for addon in addons.iter() {
// @TODO: extra_supported, extra_required filters
// perhaps we can use is_supported
@@ -37,8 +36,6 @@ impl<T> Handler for CatalogMiddleware<T> where T: Environment {
self.for_catalog(addon, cat, emit.clone());
}
}
- },
- _ => {}
}
}
}
