mirror of
				https://github.com/lov3b/ecb-rates.git
				synced 2025-11-04 07:10:18 +01:00 
			
		
		
		
	clarification
This commit is contained in:
		@@ -22,6 +22,10 @@ fn filter_currencies(exchange_rate_results: &mut [ExchangeRateResult], currencie
 | 
				
			|||||||
            .keys()
 | 
					            .keys()
 | 
				
			||||||
            .filter(|x| !currencies.contains(x))
 | 
					            .filter(|x| !currencies.contains(x))
 | 
				
			||||||
            .for_each(|key_to_remove| {
 | 
					            .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() };
 | 
					                let rates = unsafe { (*rates_ptr).borrow_mut() };
 | 
				
			||||||
                rates.remove_entry(key_to_remove);
 | 
					                rates.remove_entry(key_to_remove);
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user