From d18ba451893d798354823c0fef8c148ecbc25bee Mon Sep 17 00:00:00 2001 From: Alex Uta Date: Tue, 21 Jan 2025 09:26:42 +0000 Subject: [PATCH] Fix clippy. --- rs/execution_environment/src/query_handler/query_context.rs | 2 +- rs/execution_environment/src/scheduler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rs/execution_environment/src/query_handler/query_context.rs b/rs/execution_environment/src/query_handler/query_context.rs index b82f9a76dd3..70b909c7b71 100644 --- a/rs/execution_environment/src/query_handler/query_context.rs +++ b/rs/execution_environment/src/query_handler/query_context.rs @@ -1089,7 +1089,7 @@ impl<'a> QueryContext<'a> { let is_wasm64_execution = canister .execution_state .as_ref() - .map_or(false, |es| es.is_wasm64); + .is_some_and(|es| es.is_wasm64); let max_canister_memory_size = if is_wasm64_execution { self.max_canister_memory_size_wasm64 diff --git a/rs/execution_environment/src/scheduler.rs b/rs/execution_environment/src/scheduler.rs index 9446795bf3c..39116a2fa8b 100644 --- a/rs/execution_environment/src/scheduler.rs +++ b/rs/execution_environment/src/scheduler.rs @@ -1074,7 +1074,7 @@ impl SchedulerImpl { let canister_is_wasm64 = canister .execution_state .as_ref() - .map_or(false, |es| es.is_wasm64); + .is_some_and(|es| es.is_wasm64); if let Err(err) = canister .check_invariants(self.exec_env.max_canister_memory_size(canister_is_wasm64))