File tree Expand file tree Collapse file tree 6 files changed +13
-21
lines changed
cardano-node/mithril-cardano-node-chain/src/entities
mithril-persistence/src/database
mithril-client-cli/src/commands/cardano_stake_distribution
mithril-common/src/certificate_chain Expand file tree Collapse file tree 6 files changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,8 @@ mod test {
178178
179179 fn dummy_tx_datum ( ) -> TxDatum {
180180 let mut tx_datum_builder = TxDatumBuilder :: new ( ) ;
181- let tx_datum = tx_datum_builder
181+
182+ tx_datum_builder
182183 . add_field ( TxDatumFieldValue :: Bytes ( "bytes0" . to_string ( ) ) )
183184 . add_field ( TxDatumFieldValue :: Int ( 0 ) )
184185 . add_field ( TxDatumFieldValue :: Int ( 1 ) )
@@ -187,8 +188,7 @@ mod test {
187188 . add_field ( TxDatumFieldValue :: Int ( 2 ) )
188189 . add_field ( TxDatumFieldValue :: Bytes ( "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" . to_string ( ) ) )
189190 . build ( )
190- . expect ( "tx_datum build should not fail" ) ;
191- tx_datum
191+ . expect ( "tx_datum build should not fail" )
192192 }
193193
194194 #[ test]
Original file line number Diff line number Diff line change @@ -36,15 +36,13 @@ pub fn extract_doc_comment(attrs: &[syn::Attribute]) -> Vec<String> {
3636 } )
3737 . skip_while ( |s| is_blank ( s) )
3838 . flat_map ( |s| {
39- let lines = s
40- . split ( '\n' )
39+ s. split ( '\n' )
4140 . map ( |s| {
4241 // remove one leading space no matter what
4342 let s = s. strip_prefix ( ' ' ) . unwrap_or ( s) ;
4443 s. to_owned ( )
4544 } )
46- . collect :: < Vec < _ > > ( ) ;
47- lines
45+ . collect :: < Vec < _ > > ( )
4846 } )
4947 . collect ( ) ;
5048
Original file line number Diff line number Diff line change @@ -125,14 +125,12 @@ fn format_field(field: &syn::Field) -> FieldInfo {
125125 _ => true ,
126126 } ;
127127
128- let field_info = FieldInfo {
128+ FieldInfo {
129129 name : field. ident . as_ref ( ) . unwrap ( ) . to_string ( ) ,
130130 doc,
131131 example,
132132 is_mandatory,
133- } ;
134-
135- field_info
133+ }
136134}
137135
138136/// To extract doc from a struct.
Original file line number Diff line number Diff line change @@ -303,16 +303,15 @@ mod tests {
303303
304304 fn get_table_whatever_column_count ( connection : & SqliteConnection ) -> i64 {
305305 let sql = "select count(*) as column_count from pragma_table_info('whatever');" ;
306- let column_count = connection
306+
307+ connection
307308 . prepare ( sql)
308309 . unwrap ( )
309310 . iter ( )
310311 . next ( )
311312 . unwrap ( )
312313 . unwrap ( )
313- . read :: < i64 , _ > ( 0 ) ;
314-
315- column_count
314+ . read :: < i64 , _ > ( 0 )
316315 }
317316
318317 fn create_db_checker ( connection : & ConnectionThreadSafe ) -> DatabaseVersionChecker {
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ impl CardanoStakeDistributionDownloadCommand {
161161 client : & Client ,
162162 unique_identifier : & str ,
163163 ) -> MithrilResult < CardanoStakeDistribution > {
164- let cardano_stake_distribution = if Self :: is_sha256_hash ( unique_identifier) {
164+ if Self :: is_sha256_hash ( unique_identifier) {
165165 client
166166 . cardano_stake_distribution ( )
167167 . get ( unique_identifier)
@@ -212,9 +212,7 @@ impl CardanoStakeDistributionDownloadCommand {
212212 "No Cardano stake distribution could be found for epoch: '{}'" ,
213213 epoch
214214 ) )
215- } ;
216-
217- cardano_stake_distribution
215+ }
218216 }
219217}
220218
Original file line number Diff line number Diff line change @@ -1104,9 +1104,8 @@ mod tests {
11041104 . to_owned ( )
11051105 . try_new_with_protocol_parameters ( forged_protocol_parameters. clone ( ) )
11061106 . unwrap ( ) ;
1107- let signature = s_adversary. protocol_signer . sign ( signed_message. as_bytes ( ) ) ;
11081107
1109- signature
1108+ s_adversary . protocol_signer . sign ( signed_message . as_bytes ( ) )
11101109 } )
11111110 . collect :: < Vec < _ > > ( ) ;
11121111 let forged_clerk = ProtocolClerk :: from_registration (
You can’t perform that action at this time.
0 commit comments