File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -549,22 +549,24 @@ impl SegmentAccountant {
549549
550550 let add = |pid,
551551 lsn : Lsn ,
552- lid : Option < LogOffset > ,
552+ lid_opt : Option < LogOffset > ,
553553 segments : & mut Vec < Segment > | {
554- if lid. is_none ( ) {
554+ let lid = if let Some ( lid) = lid_opt {
555+ lid
556+ } else {
555557 trace ! (
556558 "skipping segment GC for pid {} with a heap \
557559 ptr already in the snapshot",
558560 pid
559561 ) ;
560562 return ;
561- }
562- let idx = assert_usize ( lid. unwrap ( ) / segment_size as LogOffset ) ;
563+ } ;
564+ let idx = assert_usize ( lid / segment_size as LogOffset ) ;
563565 trace ! (
564566 "adding lsn: {} lid: {} for pid {} to segment {} \
565567 during SA recovery",
566568 lsn,
567- lid. unwrap ( ) ,
569+ lid,
568570 pid,
569571 idx
570572 ) ;
You can’t perform that action at this time.
0 commit comments