File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,8 @@ impl<VM: VMBinding> CommonGenPlan<VM> {
117117 // Is the GC triggered by nursery?
118118 // - if space is none, it is not. Return false immediately.
119119 // - if space is some, we further check its descriptor.
120- let is_triggered_by_nursery = space. map_or ( false , |s| {
121- s. 0 . common ( ) . descriptor == self . nursery . common ( ) . descriptor
122- } ) ;
120+ let is_triggered_by_nursery =
121+ space. is_some_and ( |s| s. 0 . common ( ) . descriptor == self . nursery . common ( ) . descriptor ) ;
123122 // If space is full and the GC is not triggered by nursery, next GC will be full heap GC.
124123 if space_full && !is_triggered_by_nursery {
125124 self . next_gc_full_heap . store ( true , Ordering :: SeqCst ) ;
@@ -341,5 +340,5 @@ pub trait GenerationalPlanExt<VM: VMBinding>: GenerationalPlan<VM = VM> {
341340/// with any plan (generational or not). For non generational plans, it will always return false.
342341pub fn is_nursery_gc < VM : VMBinding > ( plan : & dyn Plan < VM = VM > ) -> bool {
343342 plan. generational ( )
344- . map_or ( false , |plan| plan. is_current_gc_nursery ( ) )
343+ . is_some_and ( |plan| plan. is_current_gc_nursery ( ) )
345344}
You can’t perform that action at this time.
0 commit comments