Skip to content

Commit 6f9816b

Browse files
committed
refactor(core): clippy fix unneeded muts
Signed-off-by: Alexis Asseman <[email protected]>
1 parent 30ca4ba commit 6f9816b

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

tap_core/src/tap_receipt/tests/received_receipt_tests.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ mod received_receipt_unit_test {
131131
let (collateral_adapter, collateral_storage) = collateral_adapters;
132132
// give receipt 5 second variance for min start time
133133
let starting_min_timestamp = get_current_timestamp_u64_ns().unwrap() - 500000000;
134-
let mut receipt_auditor = ReceiptAuditor::new(
134+
let receipt_auditor = ReceiptAuditor::new(
135135
collateral_adapter,
136136
receipt_checks_adapter,
137137
starting_min_timestamp,
@@ -170,16 +170,12 @@ mod received_receipt_unit_test {
170170
// perform single arbitrary check
171171
let arbitrary_check_to_perform = ReceiptCheck::CheckUnique;
172172
assert!(received_receipt
173-
.perform_check(
174-
&arbitrary_check_to_perform,
175-
receipt_id,
176-
&mut receipt_auditor
177-
)
173+
.perform_check(&arbitrary_check_to_perform, receipt_id, &receipt_auditor)
178174
.await
179175
.is_ok());
180176

181177
assert!(received_receipt
182-
.perform_checks(&checks, receipt_id, &mut receipt_auditor)
178+
.perform_checks(&checks, receipt_id, &receipt_auditor)
183179
.await
184180
.is_ok());
185181

@@ -203,7 +199,7 @@ mod received_receipt_unit_test {
203199
let (collateral_adapter, collateral_storage) = collateral_adapters;
204200
// give receipt 5 second variance for min start time
205201
let starting_min_timestamp = get_current_timestamp_u64_ns().unwrap() - 500000000;
206-
let mut receipt_auditor = ReceiptAuditor::new(
202+
let receipt_auditor = ReceiptAuditor::new(
207203
collateral_adapter,
208204
receipt_checks_adapter,
209205
starting_min_timestamp,
@@ -242,16 +238,12 @@ mod received_receipt_unit_test {
242238
// perform single arbitrary check
243239
let arbitrary_check_to_perform = ReceiptCheck::CheckUnique;
244240
assert!(received_receipt
245-
.perform_check(
246-
&arbitrary_check_to_perform,
247-
receipt_id,
248-
&mut receipt_auditor
249-
)
241+
.perform_check(&arbitrary_check_to_perform, receipt_id, &receipt_auditor)
250242
.await
251243
.is_ok());
252244

253245
assert!(received_receipt
254-
.finalize_receipt_checks(receipt_id, &mut receipt_auditor)
246+
.finalize_receipt_checks(receipt_id, &receipt_auditor)
255247
.await
256248
.is_ok());
257249

@@ -285,7 +277,7 @@ mod received_receipt_unit_test {
285277
let (collateral_adapter, collateral_storage) = collateral_adapters;
286278
// give receipt 5 second variance for min start time
287279
let starting_min_timestamp = get_current_timestamp_u64_ns().unwrap() - 500000000;
288-
let mut receipt_auditor = ReceiptAuditor::new(
280+
let receipt_auditor = ReceiptAuditor::new(
289281
collateral_adapter,
290282
receipt_checks_adapter,
291283
starting_min_timestamp,
@@ -322,7 +314,7 @@ mod received_receipt_unit_test {
322314
assert_eq!(received_receipt.rav_status, RAVStatus::NotIncluded);
323315

324316
assert!(received_receipt
325-
.finalize_receipt_checks(receipt_id, &mut receipt_auditor)
317+
.finalize_receipt_checks(receipt_id, &receipt_auditor)
326318
.await
327319
.is_ok());
328320

0 commit comments

Comments
 (0)