@@ -617,7 +617,7 @@ fn testBorderCompact4CaseFailed() {
617
617
// be error correction
618
618
let alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
619
619
// encodes as 26 * 5 * 4 = 520 bits of data
620
- let alphabet4 = format ! ( "{}{}{}{}" , alphabet , alphabet , alphabet , alphabet ) ;
620
+ let alphabet4 = format ! ( "{alphabet}{alphabet}{alphabet}{alphabet}" ) ;
621
621
aztec_encoder:: encode ( & alphabet4, 0 , -4 ) . expect ( "encode" ) ;
622
622
}
623
623
@@ -627,7 +627,7 @@ fn testBorderCompact4Case() {
627
627
// be error correction
628
628
let alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
629
629
// encodes as 26 * 5 * 4 = 520 bits of data
630
- let alphabet4 = format ! ( "{}{}{}{}" , alphabet , alphabet , alphabet , alphabet ) ;
630
+ let alphabet4 = format ! ( "{alphabet}{alphabet}{alphabet}{alphabet}" ) ;
631
631
632
632
// If we just try to encode it normally, it will go to a non-compact 4 layer
633
633
let mut aztecCode = aztec_encoder:: encode ( & alphabet4, 0 , aztec_encoder:: DEFAULT_AZTEC_LAYERS )
@@ -658,7 +658,7 @@ fn testEncode(data: &str, compact: bool, layers: u32, expected: &str) {
658
658
659
659
// let mut xored = BitMatrix::parse_strings(&stripSpace(expected), "X ", " ").expect("should parse");
660
660
// xored.xor(matrix).expect("should xor");
661
- assert_eq ! ( expected, matrix. to_string( ) , "encode({}) failed" , data ) ;
661
+ assert_eq ! ( expected, matrix. to_string( ) , "encode({data }) failed" ) ;
662
662
}
663
663
664
664
fn testEncodeDecode ( data : & str , compact : bool , layers : u32 ) {
@@ -814,8 +814,7 @@ fn testStuffBits(wordSize: usize, bits: &str, expected: &str) {
814
814
assert_eq ! (
815
815
stripSpace( expected) ,
816
816
stripSpace( & stuffed. to_string( ) ) ,
817
- "stuffBits() failed for input string: {}" ,
818
- bits
817
+ "stuffBits() failed for input string: {bits}"
819
818
) ;
820
819
}
821
820
@@ -838,8 +837,7 @@ fn testHighLevelEncodeStringUtf8(s: &str, expectedBits: &str) {
838
837
assert_eq ! (
839
838
stripSpace( expectedBits) ,
840
839
receivedBits,
841
- "highLevelEncode() failed for input string: {}" ,
842
- s
840
+ "highLevelEncode() failed for input string: {s}"
843
841
) ;
844
842
}
845
843
@@ -856,8 +854,7 @@ fn testHighLevelEncodeString(s: &str, expectedBits: &str) {
856
854
assert_eq ! (
857
855
stripSpace( expectedBits) ,
858
856
receivedBits,
859
- "highLevelEncode() failed for input string: {}" ,
860
- s
857
+ "highLevelEncode() failed for input string: {s}"
861
858
) ;
862
859
assert_eq ! (
863
860
s,
@@ -888,7 +885,6 @@ fn testHighLevelEncodeStringCount(s: &str, expectedReceivedBits: u32) {
888
885
// );
889
886
assert_eq ! (
890
887
expectedReceivedBits as usize , receivedBitCount,
891
- "highLevelEncode() failed for input string: {} with byte count ({}!={})" ,
892
- s, expectedReceivedBits, receivedBitCount
888
+ "highLevelEncode() failed for input string: {s} with byte count ({expectedReceivedBits}!={receivedBitCount})"
893
889
) ;
894
890
}
0 commit comments