Browse Source

Remove useless Debug from DispatchedMessage handler type bound.

wip
Titouan Rigoudy 6 years ago
parent
commit
cc17e60f9b
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/dispatcher.rs
  2. +1
    -1
      src/message_handler.rs

+ 1
- 1
src/dispatcher.rs View File

@ -29,7 +29,7 @@ impl<M, H> DispatchedMessage<M, H> {
impl<M, H> Job for DispatchedMessage<M, H>
where
M: Debug + Send,
H: Debug + Send + MessageHandler<M>,
H: MessageHandler<M> + Send,
{
fn execute(self: Box<Self>, context: &Context) {
if let Err(error) = self.handler.run(context, &self.message) {


+ 1
- 1
src/message_handler.rs View File

@ -7,7 +7,7 @@ use crate::context::Context;
///
/// Message types are mapped to handler types by Dispatcher.
/// This trait is intended to allow composing handler logic.
pub trait MessageHandler<Message>: Debug {
pub trait MessageHandler<Message> {
/// Attempts to handle the given message against the given context.
fn run(self, context: &Context, message: &Message) -> io::Result<()>;


Loading…
Cancel
Save