mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: replace two cases of not using fun call on unwrapping
This commit is contained in:
parent
c2f6a68648
commit
78b52c0d23
2 changed files with 2 additions and 2 deletions
|
|
@ -378,7 +378,7 @@ impl StringDecoder for Utf8LengthPrefixedDecoder {
|
|||
// Find the maximum length of the string
|
||||
let length = *data
|
||||
.first()
|
||||
.ok_or(PacketBad.context("Length of string not found"))?;
|
||||
.ok_or_else(|| PacketBad.context("Length of string not found"))?;
|
||||
|
||||
// Find the position of the delimiter in the data. If the delimiter is not
|
||||
// found, the length is returned.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue