Skip to content

Commit 03dc1d0

Browse files
committed
Remove allow
1 parent 8401f8e commit 03dc1d0

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

program/rust/src/tests/test_del_product.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,5 @@ fn mapping_product_list_equals(mapping_data: &MappingAccount, expected: Vec<Pubk
8282
return false;
8383
}
8484

85-
#[allow(clippy::needless_range_loop)]
86-
for i in 0..expected.len() {
87-
if mapping_data.products_list[i] != expected[i] {
88-
return false;
89-
}
90-
}
91-
92-
true
85+
mapping_data.products_list == expected.as_slice()
9386
}

program/rust/src/tests/test_sma_epoch_transition.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ fn test_sma_epoch_transition() {
284284
)
285285
.is_ok());
286286

287-
#[allow(clippy::identity_op)]
288287
{
289288
let price_data = load_checked::<PriceAccountWrapper>(&price_account, PC_VERSION).unwrap();
290289
// Aggregation was successful, check that all skipped buckets got updated
@@ -319,7 +318,7 @@ fn test_sma_epoch_transition() {
319318

320319
assert_eq!(
321320
price_data.time_machine.running_sum_of_price_averages[2],
322-
price_data.time_machine.running_sum_of_price_averages[1] + (60 * 28 + 1 * 41) / 29
321+
price_data.time_machine.running_sum_of_price_averages[1] + (60 * 28 + 41) / 29
323322
);
324323
assert_eq!(price_data.time_machine.running_valid_epoch_counter[2], 0);
325324

@@ -353,7 +352,6 @@ fn test_sma_epoch_transition() {
353352
)
354353
.is_ok());
355354

356-
#[allow(clippy::identity_op)]
357355
{
358356
let price_data = load_checked::<PriceAccountWrapper>(&price_account, PC_VERSION).unwrap();
359357
// Nothing got updated, since slot gap was too big, so aggregation was not successful
@@ -389,7 +387,7 @@ fn test_sma_epoch_transition() {
389387

390388
assert_eq!(
391389
price_data.time_machine.running_sum_of_price_averages[2],
392-
price_data.time_machine.running_sum_of_price_averages[1] + (60 * 28 + 1 * 41) / 29
390+
price_data.time_machine.running_sum_of_price_averages[1] + (60 * 28 + 41) / 29
393391
);
394392
assert_eq!(price_data.time_machine.running_valid_epoch_counter[2], 0);
395393

0 commit comments

Comments
 (0)