Spot the bug in the HashMap report

from Collections
Rust 1.98 intermediate 4 min 1 issue to find

Find why this report cannot promise reproducible text.

Rust
use std::collections::HashMap;

fn render_counts(events: &[&str]) -> String {
    let mut counts = HashMap::new();

    for event in events {
        *counts.entry(*event).or_insert(0) += 1;
    }

    format!("{counts:?}")
}
Open in playground
Report an error