@@ -451,7 +451,7 @@ impl TtParser {
451
451
// Try zero matches of this sequence, by skipping over it.
452
452
self . cur_mps . push ( MatcherPos {
453
453
idx : idx_first_after,
454
- matches : mp. matches . clone ( ) , // a cheap clone
454
+ matches : Lrc :: clone ( & mp. matches ) ,
455
455
} ) ;
456
456
}
457
457
@@ -464,8 +464,8 @@ impl TtParser {
464
464
// sequence. If that's not possible, `ending_mp` will fail quietly when it is
465
465
// processed next time around the loop.
466
466
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 ) ,
469
469
} ;
470
470
self . cur_mps . push ( ending_mp) ;
471
471
@@ -480,8 +480,8 @@ impl TtParser {
480
480
// separator yet. Try ending the sequence. If that's not possible, `ending_mp`
481
481
// will fail quietly when it is processed next time around the loop.
482
482
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 ) ,
485
485
} ;
486
486
self . cur_mps . push ( ending_mp) ;
487
487
0 commit comments