@@ -451,7 +451,7 @@ impl TtParser {
451451 // Try zero matches of this sequence, by skipping over it.
452452 self . cur_mps . push ( MatcherPos {
453453 idx : idx_first_after,
454- matches : mp. matches . clone ( ) , // a cheap clone
454+ matches : Lrc :: clone ( & mp. matches ) ,
455455 } ) ;
456456 }
457457
@@ -464,8 +464,8 @@ impl TtParser {
464464 // sequence. If that's not possible, `ending_mp` will fail quietly when it is
465465 // processed next time around the loop.
466466 let ending_mp = MatcherPos {
467- idx : mp. idx + 1 , // +1 skips the Kleene op
468- matches : mp. matches . clone ( ) , // a cheap clone
467+ idx : mp. idx + 1 , // +1 skips the Kleene op
468+ matches : Lrc :: clone ( & mp. matches ) ,
469469 } ;
470470 self . cur_mps . push ( ending_mp) ;
471471
@@ -480,8 +480,8 @@ impl TtParser {
480480 // separator yet. Try ending the sequence. If that's not possible, `ending_mp`
481481 // will fail quietly when it is processed next time around the loop.
482482 let ending_mp = MatcherPos {
483- idx : mp. idx + 2 , // +2 skips the separator and the Kleene op
484- matches : mp. matches . clone ( ) , // a cheap clone
483+ idx : mp. idx + 2 , // +2 skips the separator and the Kleene op
484+ matches : Lrc :: clone ( & mp. matches ) ,
485485 } ;
486486 self . cur_mps . push ( ending_mp) ;
487487
0 commit comments