From a44a4ae7b471ebc0f1a003b7908c65b954c02f59 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 9 Feb 2020 19:15:49 +0100 Subject: [PATCH] ComponentLink: Allow send_message and send_message_batch through shared references --- src/html/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/html/mod.rs b/src/html/mod.rs index 2a11679c603..7ee2f200a80 100644 --- a/src/html/mod.rs +++ b/src/html/mod.rs @@ -425,7 +425,7 @@ where /// This method sends a message to this component to be processed immediately after the /// component has been updated and/or rendered. - pub fn send_message(&mut self, msg: COMP::Message) { + pub fn send_message(&self, msg: COMP::Message) { self.scope.send_message(msg); } @@ -434,7 +434,7 @@ where /// /// All messages will first be processed by `update`, and if _any_ of them return `true`, /// then re-render will occur. - pub fn send_message_batch(&mut self, msgs: Vec) { + pub fn send_message_batch(&self, msgs: Vec) { self.scope.send_message_batch(msgs) } }