Skip to content

Commit 4fb73a0

Browse files
committed
refactor: avoid sort
1 parent b22dcac commit 4fb73a0

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

clarity/src/vm/functions/post_conditions.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,9 @@ fn check_allowances(
486486
continue;
487487
}
488488

489-
// Sort by allowance index so we check allowances in order
490-
merged.sort_by_key(|(idx, _)| *idx);
491-
492489
for (index, allowance) in merged {
493490
if *amount_moved > allowance {
494491
record_violation(index as u128);
495-
break;
496492
}
497493
}
498494
}
@@ -519,13 +515,9 @@ fn check_allowances(
519515
continue;
520516
}
521517

522-
// Sort by allowance index so we check allowances in order
523-
merged.sort_by_key(|(idx, _)| *idx);
524-
525518
for (index, allowance_vec) in merged {
526519
if ids_moved.iter().any(|id| !allowance_vec.contains(id)) {
527520
record_violation(index as u128);
528-
break;
529521
}
530522
}
531523
}

0 commit comments

Comments
 (0)