Spot the bug in the lazy map

from Iterators
Rust 1.98 intermediate 4 min 1 issue to find

Find why this helper leaves every price unchanged.

Rust
fn add_service_fee(prices: &mut [u32]) {
    prices
        .iter_mut()
        .map(|price| *price = price.saturating_add(1));
}
Open in playground
Report an error