Skip to content

Commit fb75d92

Browse files
committed
fixed clippy warnings
1 parent 4a26a7f commit fb75d92

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

dash-spv/src/chain/chainlock_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl ChainLockManager {
178178
if let Some(header) = storage
179179
.get_header(chain_lock.block_height)
180180
.await
181-
.map_err(|e| ValidationError::StorageError(e))?
181+
.map_err(ValidationError::StorageError)?
182182
{
183183
let header_hash = header.block_hash();
184184
if header_hash != chain_lock.block_hash {

dash-spv/src/sync/headers/manager.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,16 @@ impl<S: StorageManager + Send + Sync + 'static, N: NetworkManager + Send + Sync
271271
let first_height = storage
272272
.get_start_height()
273273
.await
274-
.ok_or(SyncError::Storage(format!("Failed to get start height")))?;
274+
.ok_or(SyncError::Storage("Failed to get start height".to_string()))?;
275275
let checkpoint_header = storage
276276
.get_header(first_height)
277277
.await
278278
.map_err(|e| {
279279
SyncError::Storage(format!("Failed to get first header: {}", e))
280280
})?
281-
.ok_or(SyncError::Storage(format!("Storage didn't return first header")))?;
281+
.ok_or(SyncError::Storage(
282+
"Storage didn't return first header".to_string(),
283+
))?;
282284

283285
// Use the checkpoint hash from chain state
284286
let checkpoint_hash = checkpoint_header.block_hash();
@@ -500,12 +502,12 @@ impl<S: StorageManager + Send + Sync + 'static, N: NetworkManager + Send + Sync
500502
let first_height = storage
501503
.get_start_height()
502504
.await
503-
.ok_or(SyncError::Storage(format!("Failed to get start height")))?;
505+
.ok_or(SyncError::Storage("Failed to get start height".to_string()))?;
504506
let checkpoint_header = storage
505507
.get_header(first_height)
506508
.await
507509
.map_err(|e| SyncError::Storage(format!("Failed to get first header: {}", e)))?
508-
.ok_or(SyncError::Storage(format!("Storage didn't return first header")))?;
510+
.ok_or(SyncError::Storage("Storage didn't return first header".to_string()))?;
509511

510512
let base_hash = match effective_tip_height {
511513
None => {
@@ -660,12 +662,12 @@ impl<S: StorageManager + Send + Sync + 'static, N: NetworkManager + Send + Sync
660662
let first_height = storage
661663
.get_start_height()
662664
.await
663-
.ok_or(SyncError::Storage(format!("Failed to get start height")))?;
665+
.ok_or(SyncError::Storage("Failed to get start height".to_string()))?;
664666
let checkpoint_header = storage
665667
.get_header(first_height)
666668
.await
667669
.map_err(|e| SyncError::Storage(format!("Failed to get first header: {}", e)))?
668-
.ok_or(SyncError::Storage(format!("Storage didn't return first header")))?;
670+
.ok_or(SyncError::Storage("Storage didn't return first header".to_string()))?;
669671

670672
let recovery_base_hash = match current_tip_height {
671673
None => {

0 commit comments

Comments
 (0)