summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Fox Ivey <aiden.foxivey@shopify.com>2025-09-02 17:27:28 -0400
committerTakashi Kokubun <takashikkbn@gmail.com>2025-09-02 15:57:14 -0700
commitd0ea036e8316aebe77986c060a899ee6c0510ed2 (patch)
tree70aa44fb39d3bb623d91cd5b576f3573bc24e97e
parentf23d866280bea20d2011d54dc94181e8c4256ea3 (diff)
ZJIT: Use .is_some_and
-rw-r--r--zjit/src/options.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/zjit/src/options.rs b/zjit/src/options.rs
index 1d5509d89c..f0a7f0bc7b 100644
--- a/zjit/src/options.rs
+++ b/zjit/src/options.rs
@@ -336,7 +336,7 @@ pub extern "C" fn rb_zjit_option_enabled_p(_ec: EcPtr, _self: VALUE) -> VALUE {
#[unsafe(no_mangle)]
pub extern "C" fn rb_zjit_stats_enabled_p(_ec: EcPtr, _self: VALUE) -> VALUE {
// Builtin zjit.rb calls this even if ZJIT is disabled, so OPTIONS may not be set.
- if unsafe { OPTIONS.as_ref() }.map_or(false, |opts| opts.stats) {
+ if unsafe { OPTIONS.as_ref() }.is_some_and(|opts| opts.stats) {
Qtrue
} else {
Qfalse