mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
chore: address Rust 1.71 clippy lints (#1708)
This commit is contained in:
@ -246,7 +246,7 @@ impl ApiKeyInterface for MockDb {
|
||||
) -> CustomResult<storage::ApiKey, errors::StorageError> {
|
||||
let mut locked_api_keys = self.api_keys.lock().await;
|
||||
// find a key with the given merchant_id and key_id and update, otherwise return an error
|
||||
let mut key_to_update = locked_api_keys
|
||||
let key_to_update = locked_api_keys
|
||||
.iter_mut()
|
||||
.find(|k| k.merchant_id == merchant_id && k.key_id == key_id)
|
||||
.ok_or(errors::StorageError::MockDbError)?;
|
||||
|
||||
@ -300,7 +300,7 @@ impl DisputeInterface for MockDb {
|
||||
) -> CustomResult<storage::Dispute, errors::StorageError> {
|
||||
let mut locked_disputes = self.disputes.lock().await;
|
||||
|
||||
let mut dispute_to_update = locked_disputes
|
||||
let dispute_to_update = locked_disputes
|
||||
.iter_mut()
|
||||
.find(|d| d.dispute_id == this.dispute_id)
|
||||
.ok_or(errors::StorageError::MockDbError)?;
|
||||
|
||||
@ -74,7 +74,7 @@ impl EventInterface for MockDb {
|
||||
event: storage::EventUpdate,
|
||||
) -> CustomResult<storage::Event, errors::StorageError> {
|
||||
let mut locked_events = self.events.lock().await;
|
||||
let mut event_to_update = locked_events
|
||||
let event_to_update = locked_events
|
||||
.iter_mut()
|
||||
.find(|e| e.event_id == event_id)
|
||||
.ok_or(errors::StorageError::MockDbError)?;
|
||||
|
||||
Reference in New Issue
Block a user