refactor: Switch to async closures

This commit is contained in:
2025-09-01 03:18:56 +02:00
parent e21ea0f34e
commit 1b8566e593
8 changed files with 109 additions and 124 deletions

View File

@@ -27,7 +27,7 @@ impl mlua::UserData for WrappedAsyncClient {
fn add_methods<M: mlua::UserDataMethods<Self>>(methods: &mut M) {
methods.add_async_method(
"send_message",
|_lua, this, (topic, message): (String, mlua::Value)| async move {
async |_lua, this, (topic, message): (String, mlua::Value)| {
let message = serde_json::to_string(&message).unwrap();
debug!("message = {message}");