clarification

This commit is contained in:
Love 2025-01-07 15:58:19 +01:00
parent 51d59eefe4
commit b34cc4c1b6

View File

@ -22,6 +22,10 @@ fn filter_currencies(exchange_rate_results: &mut [ExchangeRateResult], currencie
.keys()
.filter(|x| !currencies.contains(x))
.for_each(|key_to_remove| {
/* This is safe, since we:
* 1. Already have a mutable reference.
* 2. Don't run the code in paralell
*/
let rates = unsafe { (*rates_ptr).borrow_mut() };
rates.remove_entry(key_to_remove);
});