Skip to content

Commit

Permalink
fix liner
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Dec 19, 2024
1 parent 77123ea commit 7023cb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/sg-minter-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ pub fn purge_buckets(storage: &mut dyn Storage, max_buckets: u32) -> Result<u32,
return Err(MinterUtilsError::NoAvailableBuckets {});
};
let mut buckets_to_remove = 0;
for i in 0..available_buckets.len() {
if i as u32 >= max_buckets {
for (i, bucket) in available_buckets.iter().enumerate() {
if i >= max_buckets as usize {
break;
}
let bucket_key = bucket_key(available_buckets[i]);
let bucket_key = bucket_key(*bucket);
storage.remove(&bucket_key);
buckets_to_remove += 1;
}
Expand Down

0 comments on commit 7023cb2

Please sign in to comment.