diff options
| -rw-r--r-- | zjit/src/cruby_methods.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zjit/src/cruby_methods.rs b/zjit/src/cruby_methods.rs index 720683f407..9297327d73 100644 --- a/zjit/src/cruby_methods.rs +++ b/zjit/src/cruby_methods.rs @@ -237,7 +237,7 @@ fn no_inline(_fun: &mut hir::Function, _block: hir::BlockId, _recv: hir::InsnId, } fn inline_string_to_s(fun: &mut hir::Function, block: hir::BlockId, recv: hir::InsnId, args: &[hir::InsnId], state: hir::InsnId) -> Option<hir::InsnId> { - if args.len() == 0 && fun.likely_a(recv, types::StringExact, state) { + if args.is_empty() && fun.likely_a(recv, types::StringExact, state) { let recv = fun.coerce_to(block, recv, types::StringExact, state); return Some(recv); } @@ -245,7 +245,7 @@ fn inline_string_to_s(fun: &mut hir::Function, block: hir::BlockId, recv: hir::I } fn inline_kernel_itself(_fun: &mut hir::Function, _block: hir::BlockId, recv: hir::InsnId, args: &[hir::InsnId], _state: hir::InsnId) -> Option<hir::InsnId> { - if args.len() == 0 { + if args.is_empty() { // No need to coerce the receiver; that is done by the SendWithoutBlock rewriting. return Some(recv); } |
