mirror of
https://github.com/redstrate/Kawari.git
synced 2025-07-09 15:37:45 +00:00
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.
This commit is contained in:
parent
fe25cc6210
commit
72915e11d9
1 changed files with 2 additions and 2 deletions
|
@ -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<mlua::prelude::LuaValue, mlua::prelude::LuaError> = 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<mlua::prelude::LuaValue, mlua::prelude::LuaError> = lua.globals().get("command_sender");
|
||||
if let Ok(_) = command_sender {
|
||||
if command_sender.is_ok() {
|
||||
lua.globals().set("command_sender", mlua::Value::Nil)?;
|
||||
}
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Reference in a new issue