diff options
| author | Aiden Fox Ivey <aiden.foxivey@shopify.com> | 2025-09-02 17:27:28 -0400 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2025-09-02 15:57:14 -0700 |
| commit | d0ea036e8316aebe77986c060a899ee6c0510ed2 (patch) | |
| tree | 70aa44fb39d3bb623d91cd5b576f3573bc24e97e | |
| parent | f23d866280bea20d2011d54dc94181e8c4256ea3 (diff) | |
ZJIT: Use .is_some_and
| -rw-r--r-- | zjit/src/options.rs | 2 |
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 |
