File tree Expand file tree Collapse file tree 13 files changed +21
-25
lines changed
iota-transaction-builder/src Expand file tree Collapse file tree 13 files changed +21
-25
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,15 @@ async fn main() -> Result<()> {
5353 let response = client
5454 . run_query :: < CustomQuery , CustomVariables > ( & operation)
5555 . await ;
56- println ! ( "{:?}" , response ) ;
56+ println ! ( "{response :?}" ) ;
5757
5858 // Query the data for epoch 1.
5959 let epoch_id = 1 ;
6060 let operation = CustomQuery :: build ( CustomVariables { id : Some ( epoch_id) } ) ;
6161 let response = client
6262 . run_query :: < CustomQuery , CustomVariables > ( & operation)
6363 . await ;
64- println ! ( "{:?}" , response ) ;
64+ println ! ( "{response :?}" ) ;
6565
6666 // When the query has no variables, just pass () as the type argument
6767 let operation = ChainIdQuery :: build ( ( ) ) ;
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ impl std::fmt::Display for Error {
103103 write ! ( f, "{}" , self . inner. kind) ?;
104104
105105 if let Some ( source) = & self . inner . source {
106- writeln ! ( f, " {}" , source ) ?;
106+ writeln ! ( f, " {source}" ) ?;
107107 }
108108 Ok ( ( ) )
109109 }
Original file line number Diff line number Diff line change @@ -152,9 +152,7 @@ impl DynamicFieldOutput {
152152 assert_eq ! (
153153 Some ( & expected_type) ,
154154 typetag. as_ref( ) ,
155- "Expected type {}, but got {:?}" ,
156- expected_type,
157- typetag
155+ "Expected type {expected_type}, but got {typetag:?}"
158156 ) ;
159157
160158 if let Some ( dfv) = & self . value {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl TryInto<CheckpointSummary> for Checkpoint {
9393 bcs:: from_bytes :: < CheckpointSummary > ( & bcs) . map_err ( |e| {
9494 Error :: from_error (
9595 Kind :: Other ,
96- format ! ( "Failed to deserialize checkpoint summary: {}" , e ) ,
96+ format ! ( "Failed to deserialize checkpoint summary: {e}" ) ,
9797 )
9898 } )
9999 } )
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ impl std::fmt::Display for Address {
193193 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
194194 write ! ( f, "0x" ) ?;
195195 for byte in & self . 0 {
196- write ! ( f, "{:02x}" , byte ) ?;
196+ write ! ( f, "{byte :02x}" ) ?;
197197 }
198198
199199 Ok ( ( ) )
@@ -203,7 +203,7 @@ impl std::fmt::Display for Address {
203203impl std:: fmt:: Debug for Address {
204204 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
205205 f. debug_tuple ( "Address" )
206- . field ( & format_args ! ( "\" {}\" " , self ) )
206+ . field ( & format_args ! ( "\" {self }\" " ) )
207207 . finish ( )
208208 }
209209}
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ impl std::fmt::Display for Bls12381PublicKey {
114114impl std:: fmt:: Debug for Bls12381PublicKey {
115115 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
116116 f. debug_tuple ( "Bls12381PublicKey" )
117- . field ( & format_args ! ( "\" {}\" " , self ) )
117+ . field ( & format_args ! ( "\" {self }\" " ) )
118118 . finish ( )
119119 }
120120}
@@ -224,7 +224,7 @@ impl std::fmt::Display for Bls12381Signature {
224224impl std:: fmt:: Debug for Bls12381Signature {
225225 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
226226 f. debug_tuple ( "Bls12381Signature" )
227- . field ( & format_args ! ( "\" {}\" " , self ) )
227+ . field ( & format_args ! ( "\" {self }\" " ) )
228228 . finish ( )
229229 }
230230}
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ impl std::fmt::Display for Ed25519PublicKey {
107107impl std:: fmt:: Debug for Ed25519PublicKey {
108108 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
109109 f. debug_tuple ( "Ed25519PublicKey" )
110- . field ( & format_args ! ( "\" {}\" " , self ) )
110+ . field ( & format_args ! ( "\" {self }\" " ) )
111111 . finish ( )
112112 }
113113}
@@ -217,7 +217,7 @@ impl std::fmt::Display for Ed25519Signature {
217217impl std:: fmt:: Debug for Ed25519Signature {
218218 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
219219 f. debug_tuple ( "Ed25519Signature" )
220- . field ( & format_args ! ( "\" {}\" " , self ) )
220+ . field ( & format_args ! ( "\" {self }\" " ) )
221221 . finish ( )
222222 }
223223}
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl std::fmt::Display for Secp256k1PublicKey {
109109impl std:: fmt:: Debug for Secp256k1PublicKey {
110110 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
111111 f. debug_tuple ( "Secp256k1PublicKey" )
112- . field ( & format_args ! ( "\" {}\" " , self ) )
112+ . field ( & format_args ! ( "\" {self }\" " ) )
113113 . finish ( )
114114 }
115115}
@@ -219,7 +219,7 @@ impl std::fmt::Display for Secp256k1Signature {
219219impl std:: fmt:: Debug for Secp256k1Signature {
220220 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
221221 f. debug_tuple ( "Secp256k1Signature" )
222- . field ( & format_args ! ( "\" {}\" " , self ) )
222+ . field ( & format_args ! ( "\" {self }\" " ) )
223223 . finish ( )
224224 }
225225}
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl std::fmt::Display for Secp256r1PublicKey {
109109impl std:: fmt:: Debug for Secp256r1PublicKey {
110110 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
111111 f. debug_tuple ( "Secp256r1PublicKey" )
112- . field ( & format_args ! ( "\" {}\" " , self ) )
112+ . field ( & format_args ! ( "\" {self }\" " ) )
113113 . finish ( )
114114 }
115115}
@@ -219,7 +219,7 @@ impl std::fmt::Display for Secp256r1Signature {
219219impl std:: fmt:: Debug for Secp256r1Signature {
220220 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
221221 f. debug_tuple ( "Secp256r1Signature" )
222- . field ( & format_args ! ( "\" {}\" " , self ) )
222+ . field ( & format_args ! ( "\" {self }\" " ) )
223223 . finish ( )
224224 }
225225}
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ impl std::fmt::Display for Digest {
142142impl std:: fmt:: Debug for Digest {
143143 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
144144 f. debug_tuple ( "Digest" )
145- . field ( & format_args ! ( "\" {}\" " , self ) )
145+ . field ( & format_args ! ( "\" {self }\" " ) )
146146 . finish ( )
147147 }
148148}
@@ -154,7 +154,7 @@ impl std::fmt::LowerHex for Digest {
154154 }
155155
156156 for byte in self . 0 {
157- write ! ( f, "{:02x}" , byte ) ?;
157+ write ! ( f, "{byte :02x}" ) ?;
158158 }
159159
160160 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments