chore: fix clippy warnings

This commit is contained in:
Michel de Graaf
2025-06-29 22:16:17 +02:00
parent 78ac774e82
commit b69be1c6f0
15 changed files with 506 additions and 504 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ impl<Op> Handlers<Op> {
self.handlers.insert(handler.get_code(), Box::new(handler));
self
}
pub fn get_handler(&self, code: u8) -> Option<&Box<dyn MessageHandler<Op>>> {
self.handlers.get(&code)
pub fn get_handler(&self, code: u8) -> Option<&dyn MessageHandler<Op>> {
self.handlers.get(&code).map(|v| &**v)
}
}