Skip to content

Commit

Permalink
change to mutable
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-maron committed Sep 9, 2024
1 parent f10fa8b commit 5bd4b0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cdn-broker/src/tasks/broker/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl<Def: RunDef> Inner<Def> {
connection: Connection,
) -> Result<()> {
// Clone the hook
let local_message_hook = self.broker_message_hook.clone();
let mut local_message_hook = self.broker_message_hook.clone();

loop {
// Receive a message from the broker
Expand Down
2 changes: 1 addition & 1 deletion cdn-broker/src/tasks/user/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl<Def: RunDef> Inner<Def> {
connection: Connection,
) -> Result<()> {
// Clone the hook
let local_message_hook = self.user_message_hook.clone();
let mut local_message_hook = self.user_message_hook.clone();

loop {
// Receive a message from the user
Expand Down
2 changes: 1 addition & 1 deletion cdn-proto/src/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub trait MessageHookDef: Send + Sync + 'static + Clone {
///
/// # Errors
/// Is supposed to return an error if the other end should be disconnected.
fn on_message_received(&self, _message: &mut Message) -> AnyhowResult<HookResult> {
fn on_message_received(&mut self, _message: &mut Message) -> AnyhowResult<HookResult> {
Ok(HookResult::ProcessMessage)
}
}
Expand Down

0 comments on commit 5bd4b0e

Please sign in to comment.