File tree Expand file tree Collapse file tree 14 files changed +24
-26
lines changed
sui-rpc/src/proto/sui/rpc/v2beta2
sui-transaction-builder/src Expand file tree Collapse file tree 14 files changed +24
-26
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ fn main() {
58
58
. out_dir ( & out_dir)
59
59
. compile_fds ( fds. clone ( ) )
60
60
{
61
- panic ! ( "failed to compile protos: {}" , error ) ;
61
+ panic ! ( "failed to compile protos: {error}" ) ;
62
62
}
63
63
64
64
// Group the files by their package, in order to have a single fds file per package, and have
@@ -102,7 +102,7 @@ fn main() {
102
102
. status ( ) ;
103
103
match status {
104
104
Ok ( status) if !status. success ( ) => panic ! ( "You should commit the protobuf files" ) ,
105
- Err ( error) => panic ! ( "failed to run `git diff`: {}" , error ) ,
105
+ Err ( error) => panic ! ( "failed to run `git diff`: {error}" ) ,
106
106
Ok ( _) => { }
107
107
}
108
108
}
Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ async fn main() -> Result<()> {
52
52
let response = client
53
53
. run_query :: < CustomQuery , CustomVariables > ( & operation)
54
54
. await ;
55
- println ! ( "{:?}" , response ) ;
55
+ println ! ( "{response :?}" ) ;
56
56
57
57
// Query the data for epoch 1.
58
58
let epoch_id = 1 ;
59
59
let operation = CustomQuery :: build ( CustomVariables { id : Some ( epoch_id) } ) ;
60
60
let response = client
61
61
. run_query :: < CustomQuery , CustomVariables > ( & operation)
62
62
. await ;
63
- println ! ( "{:?}" , response ) ;
63
+ println ! ( "{response :?}" ) ;
64
64
65
65
// When the query has no variables, just pass () as the type argument
66
66
let operation = ChainIdQuery :: build ( ( ) ) ;
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ impl std::fmt::Display for Error {
112
112
write ! ( f, "{}" , self . inner. kind) ?;
113
113
114
114
if let Some ( source) = & self . inner . source {
115
- writeln ! ( f, " {}" , source ) ?;
115
+ writeln ! ( f, " {source}" ) ?;
116
116
}
117
117
Ok ( ( ) )
118
118
}
Original file line number Diff line number Diff line change @@ -263,9 +263,7 @@ impl DynamicFieldOutput {
263
263
assert_eq ! (
264
264
Some ( & expected_type) ,
265
265
typetag. as_ref( ) ,
266
- "Expected type {}, but got {:?}" ,
267
- expected_type,
268
- typetag
266
+ "Expected type {expected_type}, but got {typetag:?}"
269
267
) ;
270
268
271
269
if let Some ( ( _, bcs) ) = & self . value {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl TryInto<CheckpointSummary> for Checkpoint {
93
93
bcs:: from_bytes :: < CheckpointSummary > ( & bcs) . map_err ( |e| {
94
94
Error :: from_error (
95
95
Kind :: Other ,
96
- format ! ( "Failed to deserialize checkpoint summary: {}" , e ) ,
96
+ format ! ( "Failed to deserialize checkpoint summary: {e}" ) ,
97
97
)
98
98
} )
99
99
} )
Original file line number Diff line number Diff line change
1
+ #![ allow( clippy:: uninlined_format_args) ]
2
+
1
3
// Include the generated proto definitions
2
4
include ! ( "../../../generated/sui.rpc.v2beta2.rs" ) ;
3
5
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ impl std::fmt::Display for Address {
184
184
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
185
185
write ! ( f, "0x" ) ?;
186
186
for byte in & self . 0 {
187
- write ! ( f, "{:02x}" , byte ) ?;
187
+ write ! ( f, "{byte :02x}" ) ?;
188
188
}
189
189
190
190
Ok ( ( ) )
@@ -194,7 +194,7 @@ impl std::fmt::Display for Address {
194
194
impl std:: fmt:: Debug for Address {
195
195
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
196
196
f. debug_tuple ( "Address" )
197
- . field ( & format_args ! ( "\" {}\" " , self ) )
197
+ . field ( & format_args ! ( "\" {self }\" " ) )
198
198
. finish ( )
199
199
}
200
200
}
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ impl std::fmt::Display for Bls12381PublicKey {
107
107
impl std:: fmt:: Debug for Bls12381PublicKey {
108
108
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
109
109
f. debug_tuple ( "Bls12381PublicKey" )
110
- . field ( & format_args ! ( "\" {}\" " , self ) )
110
+ . field ( & format_args ! ( "\" {self }\" " ) )
111
111
. finish ( )
112
112
}
113
113
}
@@ -215,7 +215,7 @@ impl std::fmt::Display for Bls12381Signature {
215
215
impl std:: fmt:: Debug for Bls12381Signature {
216
216
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
217
217
f. debug_tuple ( "Bls12381Signature" )
218
- . field ( & format_args ! ( "\" {}\" " , self ) )
218
+ . field ( & format_args ! ( "\" {self }\" " ) )
219
219
. finish ( )
220
220
}
221
221
}
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ impl std::fmt::Display for Ed25519PublicKey {
101
101
impl std:: fmt:: Debug for Ed25519PublicKey {
102
102
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
103
103
f. debug_tuple ( "Ed25519PublicKey" )
104
- . field ( & format_args ! ( "\" {}\" " , self ) )
104
+ . field ( & format_args ! ( "\" {self }\" " ) )
105
105
. finish ( )
106
106
}
107
107
}
@@ -209,7 +209,7 @@ impl std::fmt::Display for Ed25519Signature {
209
209
impl std:: fmt:: Debug for Ed25519Signature {
210
210
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
211
211
f. debug_tuple ( "Ed25519Signature" )
212
- . field ( & format_args ! ( "\" {}\" " , self ) )
212
+ . field ( & format_args ! ( "\" {self }\" " ) )
213
213
. finish ( )
214
214
}
215
215
}
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ impl std::fmt::Display for Secp256k1PublicKey {
103
103
impl std:: fmt:: Debug for Secp256k1PublicKey {
104
104
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
105
105
f. debug_tuple ( "Secp256k1PublicKey" )
106
- . field ( & format_args ! ( "\" {}\" " , self ) )
106
+ . field ( & format_args ! ( "\" {self }\" " ) )
107
107
. finish ( )
108
108
}
109
109
}
@@ -211,7 +211,7 @@ impl std::fmt::Display for Secp256k1Signature {
211
211
impl std:: fmt:: Debug for Secp256k1Signature {
212
212
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
213
213
f. debug_tuple ( "Secp256k1Signature" )
214
- . field ( & format_args ! ( "\" {}\" " , self ) )
214
+ . field ( & format_args ! ( "\" {self }\" " ) )
215
215
. finish ( )
216
216
}
217
217
}
You can’t perform that action at this time.
0 commit comments