@@ -526,16 +526,16 @@ pub struct SeqSendPathV2 {
526
526
527
527
impl SeqSendPathV2 {
528
528
pub fn new (
529
- source_client_on_target : ClientId ,
530
- source_prefix : String ,
531
- target_client_on_source : ClientId ,
532
- target_prefix : String ,
529
+ source_client_on_target : & ClientId ,
530
+ source_prefix : & str ,
531
+ target_client_on_source : & ClientId ,
532
+ target_prefix : & str ,
533
533
) -> Self {
534
534
Self {
535
- source_client_on_target,
536
- source_prefix,
537
- target_client_on_source,
538
- target_prefix,
535
+ source_client_on_target : source_client_on_target . clone ( ) ,
536
+ source_prefix : source_prefix . to_string ( ) ,
537
+ target_client_on_source : target_client_on_source . clone ( ) ,
538
+ target_prefix : target_prefix . to_string ( ) ,
539
539
}
540
540
}
541
541
}
@@ -589,16 +589,16 @@ pub struct SeqRecvPathV2 {
589
589
590
590
impl SeqRecvPathV2 {
591
591
pub fn new (
592
- source_client_on_target : ClientId ,
593
- source_prefix : String ,
594
- target_client_on_source : ClientId ,
595
- target_prefix : String ,
592
+ source_client_on_target : & ClientId ,
593
+ source_prefix : & str ,
594
+ target_client_on_source : & ClientId ,
595
+ target_prefix : & str ,
596
596
) -> Self {
597
597
Self {
598
- source_client_on_target,
599
- source_prefix,
600
- target_client_on_source,
601
- target_prefix,
598
+ source_client_on_target : source_client_on_target . clone ( ) ,
599
+ source_prefix : source_prefix . to_string ( ) ,
600
+ target_client_on_source : target_client_on_source . clone ( ) ,
601
+ target_prefix : target_prefix . to_string ( ) ,
602
602
}
603
603
}
604
604
}
@@ -652,16 +652,16 @@ pub struct SeqAckPathV2 {
652
652
653
653
impl SeqAckPathV2 {
654
654
pub fn new (
655
- source_client_on_target : ClientId ,
656
- source_prefix : String ,
657
- target_client_on_source : ClientId ,
658
- target_prefix : String ,
655
+ source_client_on_target : & ClientId ,
656
+ source_prefix : & str ,
657
+ target_client_on_source : & ClientId ,
658
+ target_prefix : & str ,
659
659
) -> Self {
660
660
Self {
661
- source_client_on_target,
662
- source_prefix,
663
- target_client_on_source,
664
- target_prefix,
661
+ source_client_on_target : source_client_on_target . clone ( ) ,
662
+ source_prefix : source_prefix . to_string ( ) ,
663
+ target_client_on_source : target_client_on_source . clone ( ) ,
664
+ target_prefix : target_prefix . to_string ( ) ,
665
665
}
666
666
}
667
667
}
@@ -732,18 +732,18 @@ pub struct CommitmentPathV2 {
732
732
733
733
impl CommitmentPathV2 {
734
734
pub fn new (
735
- source_client_on_target : ClientId ,
736
- source_prefix : String ,
737
- target_client_on_source : ClientId ,
738
- target_prefix : String ,
739
- sequence : Sequence ,
735
+ source_client_on_target : & ClientId ,
736
+ source_prefix : & str ,
737
+ target_client_on_source : & ClientId ,
738
+ target_prefix : & str ,
739
+ sequence : & Sequence ,
740
740
) -> Self {
741
741
Self {
742
- source_client_on_target,
743
- source_prefix,
744
- target_client_on_source,
745
- target_prefix,
746
- sequence,
742
+ source_client_on_target : source_client_on_target . clone ( ) ,
743
+ source_prefix : source_prefix . to_string ( ) ,
744
+ target_client_on_source : target_client_on_source . clone ( ) ,
745
+ target_prefix : target_prefix . to_string ( ) ,
746
+ sequence : * sequence ,
747
747
}
748
748
}
749
749
@@ -820,18 +820,18 @@ pub struct AckPathV2 {
820
820
821
821
impl AckPathV2 {
822
822
pub fn new (
823
- source_client_on_target : ClientId ,
824
- source_prefix : String ,
825
- target_client_on_source : ClientId ,
826
- target_prefix : String ,
827
- sequence : Sequence ,
823
+ source_client_on_target : & ClientId ,
824
+ source_prefix : & str ,
825
+ target_client_on_source : & ClientId ,
826
+ target_prefix : & str ,
827
+ sequence : & Sequence ,
828
828
) -> Self {
829
829
Self {
830
- source_client_on_target,
831
- source_prefix,
832
- target_client_on_source,
833
- target_prefix,
834
- sequence,
830
+ source_client_on_target : source_client_on_target . clone ( ) ,
831
+ source_prefix : source_prefix . to_string ( ) ,
832
+ target_client_on_source : target_client_on_source . clone ( ) ,
833
+ target_prefix : target_prefix . to_string ( ) ,
834
+ sequence : * sequence ,
835
835
}
836
836
}
837
837
@@ -908,18 +908,18 @@ pub struct ReceiptPathV2 {
908
908
909
909
impl ReceiptPathV2 {
910
910
pub fn new (
911
- source_client_on_target : ClientId ,
912
- source_prefix : String ,
913
- target_client_on_source : ClientId ,
914
- target_prefix : String ,
915
- sequence : Sequence ,
911
+ source_client_on_target : & ClientId ,
912
+ source_prefix : & str ,
913
+ target_client_on_source : & ClientId ,
914
+ target_prefix : & str ,
915
+ sequence : & Sequence ,
916
916
) -> Self {
917
917
Self {
918
- source_client_on_target,
919
- source_prefix,
920
- target_client_on_source,
921
- target_prefix,
922
- sequence,
918
+ source_client_on_target : source_client_on_target . clone ( ) ,
919
+ source_prefix : source_prefix . to_string ( ) ,
920
+ target_client_on_source : target_client_on_source . clone ( ) ,
921
+ target_prefix : target_prefix . to_string ( ) ,
922
+ sequence : * sequence ,
923
923
}
924
924
}
925
925
@@ -1378,34 +1378,34 @@ fn parse_commit_ack_receipt_seqs_v2(components: &[&str]) -> Option<Path> {
1378
1378
}
1379
1379
1380
1380
let source_client_on_target = ClientId :: from_str ( components[ 3 ] ) . ok ( ) ?;
1381
- let source_prefix = components[ 5 ] . into ( ) ;
1381
+ let source_prefix = components[ 5 ] ;
1382
1382
let target_client_on_source = ClientId :: from_str ( components[ 7 ] ) . ok ( ) ?;
1383
- let target_prefix = components[ 9 ] . into ( ) ;
1383
+ let target_prefix = components[ 9 ] ;
1384
1384
1385
1385
match components[ 1 ] {
1386
1386
NEXT_SEQ_SEND_PREFIX => Some (
1387
1387
SeqSendPathV2 :: new (
1388
- source_client_on_target,
1388
+ & source_client_on_target,
1389
1389
source_prefix,
1390
- target_client_on_source,
1390
+ & target_client_on_source,
1391
1391
target_prefix,
1392
1392
)
1393
1393
. into ( ) ,
1394
1394
) ,
1395
1395
NEXT_SEQ_RECV_PREFIX => Some (
1396
1396
SeqRecvPathV2 :: new (
1397
- source_client_on_target,
1397
+ & source_client_on_target,
1398
1398
source_prefix,
1399
- target_client_on_source,
1399
+ & target_client_on_source,
1400
1400
target_prefix,
1401
1401
)
1402
1402
. into ( ) ,
1403
1403
) ,
1404
1404
NEXT_SEQ_ACK_PREFIX => Some (
1405
1405
SeqAckPathV2 :: new (
1406
- source_client_on_target,
1406
+ & source_client_on_target,
1407
1407
source_prefix,
1408
- target_client_on_source,
1408
+ & target_client_on_source,
1409
1409
target_prefix,
1410
1410
)
1411
1411
. into ( ) ,
@@ -1437,39 +1437,39 @@ fn parse_commit_ack_receipt_v2(components: &[&str]) -> Option<Path> {
1437
1437
}
1438
1438
1439
1439
let source_client_on_target = ClientId :: from_str ( components[ 3 ] ) . ok ( ) ?;
1440
- let source_prefix = components[ 5 ] . into ( ) ;
1440
+ let source_prefix = components[ 5 ] ;
1441
1441
let target_client_on_source = ClientId :: from_str ( components[ 7 ] ) . ok ( ) ?;
1442
- let target_prefix = components[ 9 ] . into ( ) ;
1442
+ let target_prefix = components[ 9 ] ;
1443
1443
let sequence = Sequence :: from_str ( components[ 11 ] ) . ok ( ) ?;
1444
1444
1445
1445
match components[ 1 ] {
1446
1446
PACKET_COMMITMENT_PREFIX => Some (
1447
1447
CommitmentPathV2 :: new (
1448
- source_client_on_target,
1448
+ & source_client_on_target,
1449
1449
source_prefix,
1450
- target_client_on_source,
1450
+ & target_client_on_source,
1451
1451
target_prefix,
1452
- sequence,
1452
+ & sequence,
1453
1453
)
1454
1454
. into ( ) ,
1455
1455
) ,
1456
1456
PACKET_ACK_PREFIX => Some (
1457
1457
AckPathV2 :: new (
1458
- source_client_on_target,
1458
+ & source_client_on_target,
1459
1459
source_prefix,
1460
- target_client_on_source,
1460
+ & target_client_on_source,
1461
1461
target_prefix,
1462
- sequence,
1462
+ & sequence,
1463
1463
)
1464
1464
. into ( ) ,
1465
1465
) ,
1466
1466
PACKET_RECEIPT_PREFIX => Some (
1467
1467
ReceiptPathV2 :: new (
1468
- source_client_on_target,
1468
+ & source_client_on_target,
1469
1469
source_prefix,
1470
- target_client_on_source,
1470
+ & target_client_on_source,
1471
1471
target_prefix,
1472
- sequence,
1472
+ & sequence,
1473
1473
)
1474
1474
. into ( ) ,
1475
1475
) ,
0 commit comments