Skip to content
This repository was archived by the owner on Dec 26, 2024. It is now read-only.

Commit b33bb4c

Browse files
chore: replace ok_or with ok_or_else (#2210)
1 parent c11022c commit b33bb4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/papyrus_rpc/src/v0_7/api/api_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ impl JsonRpcServer for JsonRpcServerImpl {
14611461

14621462
// Check if this class exists in the Cairo0 classes table.
14631463
let state_number = StateNumber::right_after_block(block_number)
1464-
.ok_or(internal_server_error("Could not compute state number"))?;
1464+
.ok_or_else(|| internal_server_error("Could not compute state number"))?;
14651465
let deprecated_compiled_contract_class = state_reader
14661466
.get_deprecated_class_definition_at(state_number, &class_hash)
14671467
.map_err(internal_server_error)?

0 commit comments

Comments
 (0)