@@ -506,13 +506,13 @@ mod tests {
506506
507507 #[ test]
508508 fn get_ck_queue_offset_with_valid_string ( ) {
509- let result = ExtraInfoUtil :: get_ck_queue_offset ( & vec ! [ "123" . to_string( ) ] ) . unwrap ( ) ;
509+ let result = ExtraInfoUtil :: get_ck_queue_offset ( & [ "123" . to_string ( ) ] ) . unwrap ( ) ;
510510 assert_eq ! ( result, 123 ) ;
511511 }
512512
513513 #[ test]
514514 fn get_ck_queue_offset_with_invalid_string ( ) {
515- let result = ExtraInfoUtil :: get_ck_queue_offset ( & vec ! [ "abc" . to_string( ) ] ) . unwrap_err ( ) ;
515+ let result = ExtraInfoUtil :: get_ck_queue_offset ( & [ "abc" . to_string ( ) ] ) . unwrap_err ( ) ;
516516 assert_eq ! (
517517 result. to_string( ) ,
518518 IllegalArgument ( "parse ck_queue_offset error" . to_string( ) ) . to_string( )
@@ -521,14 +521,13 @@ mod tests {
521521
522522 #[ test]
523523 fn get_pop_time_with_valid_string ( ) {
524- let result =
525- ExtraInfoUtil :: get_pop_time ( & vec ! [ "123" . to_string( ) , "456" . to_string( ) ] ) . unwrap ( ) ;
524+ let result = ExtraInfoUtil :: get_pop_time ( & [ "123" . to_string ( ) , "456" . to_string ( ) ] ) . unwrap ( ) ;
526525 assert_eq ! ( result, 456 ) ;
527526 }
528527
529528 #[ test]
530529 fn get_pop_time_with_insufficient_length ( ) {
531- let result = ExtraInfoUtil :: get_pop_time ( & vec ! [ "123" . to_string( ) ] ) . unwrap_err ( ) ;
530+ let result = ExtraInfoUtil :: get_pop_time ( & [ "123" . to_string ( ) ] ) . unwrap_err ( ) ;
532531 assert_eq ! (
533532 result. to_string( ) ,
534533 IllegalArgument ( "getPopTime fail, extraInfoStrs length 1" . to_string( ) ) . to_string( )
@@ -537,7 +536,7 @@ mod tests {
537536
538537 #[ test]
539538 fn get_invisible_time_with_valid_string ( ) {
540- let result = ExtraInfoUtil :: get_invisible_time ( & vec ! [
539+ let result = ExtraInfoUtil :: get_invisible_time ( & [
541540 "123" . to_string ( ) ,
542541 "456" . to_string ( ) ,
543542 "789" . to_string ( ) ,
@@ -548,8 +547,8 @@ mod tests {
548547
549548 #[ test]
550549 fn get_invisible_time_with_insufficient_length ( ) {
551- let result = ExtraInfoUtil :: get_invisible_time ( & vec ! [ "123" . to_string ( ) , "456" . to_string ( ) ] )
552- . unwrap_err ( ) ;
550+ let result =
551+ ExtraInfoUtil :: get_invisible_time ( & [ "123" . to_string ( ) , "456" . to_string ( ) ] ) . unwrap_err ( ) ;
553552 assert_eq ! (
554553 result. to_string( ) ,
555554 IllegalArgument ( "getInvisibleTime fail, extraInfoStrs length 2" . to_string( ) )
@@ -559,7 +558,7 @@ mod tests {
559558
560559 #[ test]
561560 fn get_revive_qid_with_valid_string ( ) {
562- let result = ExtraInfoUtil :: get_revive_qid ( & vec ! [
561+ let result = ExtraInfoUtil :: get_revive_qid ( & [
563562 "123" . to_string ( ) ,
564563 "456" . to_string ( ) ,
565564 "789" . to_string ( ) ,
@@ -571,7 +570,7 @@ mod tests {
571570
572571 #[ test]
573572 fn get_revive_qid_with_insufficient_length ( ) {
574- let result = ExtraInfoUtil :: get_revive_qid ( & vec ! [
573+ let result = ExtraInfoUtil :: get_revive_qid ( & [
575574 "123" . to_string ( ) ,
576575 "456" . to_string ( ) ,
577576 "789" . to_string ( ) ,
@@ -586,7 +585,7 @@ mod tests {
586585 #[ test]
587586 fn get_real_topic_with_retry_v1 ( ) {
588587 let result = ExtraInfoUtil :: get_real_topic (
589- & vec ! [
588+ & [
590589 "123" . to_string ( ) ,
591590 "456" . to_string ( ) ,
592591 "789" . to_string ( ) ,
@@ -603,7 +602,7 @@ mod tests {
603602 #[ test]
604603 fn get_real_topic_with_retry_v2 ( ) {
605604 let result = ExtraInfoUtil :: get_real_topic (
606- & vec ! [
605+ & [
607606 "123" . to_string ( ) ,
608607 "456" . to_string ( ) ,
609608 "789" . to_string ( ) ,
@@ -620,7 +619,7 @@ mod tests {
620619 #[ test]
621620 fn get_real_topic_with_normal_topic ( ) {
622621 let result = ExtraInfoUtil :: get_real_topic (
623- & vec ! [
622+ & [
624623 "123" . to_string ( ) ,
625624 "456" . to_string ( ) ,
626625 "789" . to_string ( ) ,
@@ -637,7 +636,7 @@ mod tests {
637636 #[ test]
638637 fn get_real_topic_with_insufficient_length ( ) {
639638 let result = ExtraInfoUtil :: get_real_topic (
640- & vec ! [
639+ & [
641640 "123" . to_string ( ) ,
642641 "456" . to_string ( ) ,
643642 "789" . to_string ( ) ,
@@ -664,7 +663,7 @@ mod tests {
664663
665664 #[ test]
666665 fn get_retry_slice_with_valid_string ( ) {
667- let result = ExtraInfoUtil :: get_retry ( & vec ! [
666+ let result = ExtraInfoUtil :: get_retry ( & [
668667 "123" . to_string ( ) ,
669668 "456" . to_string ( ) ,
670669 "789" . to_string ( ) ,
@@ -677,7 +676,7 @@ mod tests {
677676
678677 #[ test]
679678 fn get_retry_slice_with_insufficient_length ( ) {
680- let result = ExtraInfoUtil :: get_retry ( & vec ! [
679+ let result = ExtraInfoUtil :: get_retry ( & [
681680 "123" . to_string ( ) ,
682681 "456" . to_string ( ) ,
683682 "789" . to_string ( ) ,
@@ -692,7 +691,7 @@ mod tests {
692691
693692 #[ test]
694693 fn get_broker_name_with_valid_string ( ) {
695- let result = ExtraInfoUtil :: get_broker_name ( & vec ! [
694+ let result = ExtraInfoUtil :: get_broker_name ( & [
696695 "123" . to_string ( ) ,
697696 "456" . to_string ( ) ,
698697 "789" . to_string ( ) ,
@@ -706,7 +705,7 @@ mod tests {
706705
707706 #[ test]
708707 fn get_broker_name_with_insufficient_length ( ) {
709- let result = ExtraInfoUtil :: get_broker_name ( & vec ! [
708+ let result = ExtraInfoUtil :: get_broker_name ( & [
710709 "123" . to_string ( ) ,
711710 "456" . to_string ( ) ,
712711 "789" . to_string ( ) ,
@@ -722,7 +721,7 @@ mod tests {
722721
723722 #[ test]
724723 fn get_queue_id_with_valid_string ( ) {
725- let result = ExtraInfoUtil :: get_queue_id ( & vec ! [
724+ let result = ExtraInfoUtil :: get_queue_id ( & [
726725 "123" . to_string ( ) ,
727726 "456" . to_string ( ) ,
728727 "789" . to_string ( ) ,
@@ -737,7 +736,7 @@ mod tests {
737736
738737 #[ test]
739738 fn get_queue_id_with_insufficient_length ( ) {
740- let result = ExtraInfoUtil :: get_queue_id ( & vec ! [
739+ let result = ExtraInfoUtil :: get_queue_id ( & [
741740 "123" . to_string ( ) ,
742741 "456" . to_string ( ) ,
743742 "789" . to_string ( ) ,
@@ -754,7 +753,7 @@ mod tests {
754753
755754 #[ test]
756755 fn get_queue_offset_with_valid_string ( ) {
757- let result = ExtraInfoUtil :: get_queue_offset ( & vec ! [
756+ let result = ExtraInfoUtil :: get_queue_offset ( & [
758757 "123" . to_string ( ) ,
759758 "456" . to_string ( ) ,
760759 "789" . to_string ( ) ,
@@ -770,7 +769,7 @@ mod tests {
770769
771770 #[ test]
772771 fn get_queue_offset_with_insufficient_length ( ) {
773- let result = ExtraInfoUtil :: get_queue_offset ( & vec ! [
772+ let result = ExtraInfoUtil :: get_queue_offset ( & [
774773 "123" . to_string ( ) ,
775774 "456" . to_string ( ) ,
776775 "789" . to_string ( ) ,
@@ -830,7 +829,7 @@ mod tests {
830829 #[ test]
831830 fn build_msg_offset_info_creates_correct_string ( ) {
832831 let mut string_builder = String :: new ( ) ;
833- ExtraInfoUtil :: build_msg_offset_info ( & mut string_builder, "topic" , 7 , & vec ! [ 100 , 200 , 300 ] ) ;
832+ ExtraInfoUtil :: build_msg_offset_info ( & mut string_builder, "topic" , 7 , & [ 100 , 200 , 300 ] ) ;
834833 assert_eq ! ( string_builder, "0 7 100;200;300" ) ;
835834 }
836835
@@ -897,7 +896,7 @@ mod tests {
897896
898897 #[ test]
899898 fn is_order_with_order_queue ( ) {
900- let result = ExtraInfoUtil :: is_order ( & vec ! [
899+ let result = ExtraInfoUtil :: is_order ( & [
901900 "123" . to_string ( ) ,
902901 "456" . to_string ( ) ,
903902 "789" . to_string ( ) ,
@@ -913,7 +912,7 @@ mod tests {
913912
914913 #[ test]
915914 fn is_order_with_non_order_queue ( ) {
916- let result = ExtraInfoUtil :: is_order ( & vec ! [
915+ let result = ExtraInfoUtil :: is_order ( & [
917916 "123" . to_string ( ) ,
918917 "456" . to_string ( ) ,
919918 "789" . to_string ( ) ,
0 commit comments