File tree Expand file tree Collapse file tree 7 files changed +11
-11
lines changed Expand file tree Collapse file tree 7 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 20
20
- uses : actions/checkout@v4
21
21
- uses : dtolnay/rust-toolchain@master
22
22
with :
23
- toolchain : 1.85 .0
23
+ toolchain : 1.88 .0
24
24
components : clippy
25
25
- run : cargo clippy --all --all-features -- -D warnings
26
26
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ impl Debug for Signature {
166
166
write ! ( f, "bignp256::dsa::Signature(" ) ?;
167
167
168
168
for byte in self . to_bytes ( ) {
169
- write ! ( f, "{:02X}" , byte ) ?;
169
+ write ! ( f, "{byte :02X}" ) ?;
170
170
}
171
171
172
172
write ! ( f, ")" )
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ impl elliptic_curve::zeroize::Zeroize for CompressedEdwardsY {
42
42
impl Display for CompressedEdwardsY {
43
43
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> FmtResult {
44
44
for b in & self . 0 [ ..] {
45
- write ! ( f, "{:02x}" , b ) ?;
45
+ write ! ( f, "{b :02x}" ) ?;
46
46
}
47
47
Ok ( ( ) )
48
48
}
@@ -51,7 +51,7 @@ impl Display for CompressedEdwardsY {
51
51
impl LowerHex for CompressedEdwardsY {
52
52
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> FmtResult {
53
53
for b in & self . 0 [ ..] {
54
- write ! ( f, "{:02x}" , b ) ?;
54
+ write ! ( f, "{b :02x}" ) ?;
55
55
}
56
56
Ok ( ( ) )
57
57
}
@@ -60,7 +60,7 @@ impl LowerHex for CompressedEdwardsY {
60
60
impl UpperHex for CompressedEdwardsY {
61
61
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> FmtResult {
62
62
for b in & self . 0 [ ..] {
63
- write ! ( f, "{:02X}" , b ) ?;
63
+ write ! ( f, "{b :02X}" ) ?;
64
64
}
65
65
Ok ( ( ) )
66
66
}
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ impl<C: CurveWithScalar> Display for Scalar<C> {
94
94
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> FmtResult {
95
95
let bytes = self . to_repr ( ) ;
96
96
for b in & bytes {
97
- write ! ( f, "{:02x}" , b ) ?;
97
+ write ! ( f, "{b :02x}" ) ?;
98
98
}
99
99
Ok ( ( ) )
100
100
}
@@ -454,7 +454,7 @@ impl<C: CurveWithScalar> core::fmt::LowerHex for Scalar<C> {
454
454
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> core:: fmt:: Result {
455
455
let tmp = C :: to_repr ( self ) ;
456
456
for & b in tmp. iter ( ) {
457
- write ! ( f, "{:02x}" , b ) ?;
457
+ write ! ( f, "{b :02x}" ) ?;
458
458
}
459
459
Ok ( ( ) )
460
460
}
@@ -464,7 +464,7 @@ impl<C: CurveWithScalar> core::fmt::UpperHex for Scalar<C> {
464
464
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> core:: fmt:: Result {
465
465
let tmp = C :: to_repr ( self ) ;
466
466
for & b in tmp. iter ( ) {
467
- write ! ( f, "{:02X}" , b ) ?;
467
+ write ! ( f, "{b :02X}" ) ?;
468
468
}
469
469
Ok ( ( ) )
470
470
}
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ impl Debug for Signature {
150
150
write ! ( f, "sm2::dsa::Signature(" ) ?;
151
151
152
152
for byte in self . to_bytes ( ) {
153
- write ! ( f, "{:02X}" , byte ) ?;
153
+ write ! ( f, "{byte :02X}" ) ?;
154
154
}
155
155
156
156
write ! ( f, ")" )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ fn create_test_signing_key() -> SigningKey {
18
18
let test_key = [ 42u8 ; 32 ] ;
19
19
let scalar = <Scalar as Reduce < U256 > >:: reduce_bytes ( & test_key. into ( ) ) ;
20
20
let scalar = NonZeroScalar :: new ( scalar) . unwrap ( ) ;
21
- SigningKey :: from_nonzero_scalar ( IDENTITY . into ( ) , scalar) . unwrap ( )
21
+ SigningKey :: from_nonzero_scalar ( IDENTITY , scalar) . unwrap ( )
22
22
}
23
23
24
24
#[ test]
Original file line number Diff line number Diff line change @@ -148,5 +148,5 @@ fn test_x509() {
148
148
let secret_key = PKCS8_PRIVATE_KEY_PEM . parse :: < sm2:: SecretKey > ( ) . unwrap ( ) ;
149
149
const IDENTITY : & str =
"[email protected] " ;
150
150
let signing_key = SigningKey :: new ( IDENTITY , & secret_key) . unwrap ( ) ;
151
- let _signature = dummy_cert_builder :: < _ , Signature > ( & signing_key) ;
151
+ dummy_cert_builder :: < _ , Signature > ( & signing_key) ;
152
152
}
You can’t perform that action at this time.
0 commit comments