From 72915e11d97eb924a6d05eb5614e9928ba9baeba Mon Sep 17 00:00:00 2001 From: The Dax Date: Fri, 4 Jul 2025 10:32:59 -0400 Subject: [PATCH] Address two of "warning: redundant pattern matching, consider using `is_ok()`" -We should really refactor this part of the code, it's a bunch of copy paste. --- src/bin/kawari-world.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/kawari-world.rs b/src/bin/kawari-world.rs index 414b853..ad0a94e 100644 --- a/src/bin/kawari-world.rs +++ b/src/bin/kawari-world.rs @@ -574,7 +574,7 @@ async fn client_loop( * This is reset -after- running the command intentionally. Resetting beforehand will never display the command's identifier. */ let command_sender: Result = lua.globals().get("command_sender"); - if let Ok(_) = command_sender { + if command_sender.is_ok() { lua.globals().set("command_sender", mlua::Value::Nil)?; } Ok(()) @@ -674,7 +674,7 @@ async fn client_loop( * This is reset -after- running the command intentionally. Resetting beforehand will never display the command's identifier. */ let command_sender: Result = lua.globals().get("command_sender"); - if let Ok(_) = command_sender { + if command_sender.is_ok() { lua.globals().set("command_sender", mlua::Value::Nil)?; } Ok(())