Skip to content

Commit dde9617

Browse files
authored
use ok_or_else
1 parent 67bf818 commit dde9617

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rs/src/protocol/compact.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ where
189189
self.last_read_field_id = self
190190
.last_read_field_id
191191
.checked_add(field_delta as i16)
192-
.ok_or(crate::Error::Protocol(crate::ProtocolError {
192+
.ok_or_else(|| crate::Error::Protocol(crate::ProtocolError {
193193
kind: crate::ProtocolErrorKind::InvalidData,
194194
message: format!(
195195
"invalid field delta {} for last field id {}",

0 commit comments

Comments
 (0)