commit e45ccccc808f68b4c03fe4f894ef1e54a67016f7
parent 66fe44ccd85e355f6a0206ecec6b6cd653fad45e
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 26 Jan 2021 19:08:30 +0100
fix: Make sure to not move or borrow self
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mrsbfh-macros/src/lib.rs b/mrsbfh-macros/src/lib.rs
@@ -331,6 +331,7 @@ pub fn commands(_: TokenStream, input: TokenStream) -> TokenStream {
let room_id = room.read().await.clone().room_id;
let cloned_config = self.config.clone();
+ let cloned_client = self.client.clone();
tokio::spawn(async move {
let mut split = msg_body.split_whitespace();
@@ -340,7 +341,6 @@ pub fn commands(_: TokenStream, input: TokenStream) -> TokenStream {
// Make sure this is immutable
let args: Vec<&str> = split.collect();
- let cloned_client = self.client.clone();
if let Err(e) = match_command(
command.replace("!", "").as_str(),
cloned_client.clone(),