From 0aa498b30be7d3e135b5493c88c3f068e8efd936 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Mon, 11 Dec 2023 03:56:14 +0200 Subject: [PATCH] chore: simplify condition to use equals operator --- crates/lib/src/protocols/unreal2/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib/src/protocols/unreal2/protocol.rs b/crates/lib/src/protocols/unreal2/protocol.rs index beeed44..1c47e1a 100644 --- a/crates/lib/src/protocols/unreal2/protocol.rs +++ b/crates/lib/src/protocols/unreal2/protocol.rs @@ -225,7 +225,7 @@ impl StringDecoder for Unreal2StringDecoder { // For UCS-2 strings, some unreal 2 games randomly insert an extra 0x01 here, // not included in the length. Skip it if present (hopefully this never happens // legitimately) - if let Some(1) = data[start ..].first() { + if data[start ..].first() == Some(&1) { start += 1; } }