Couldn't this be
```rust
match map.find_mut(&id) {
    None => {}
    Some(a) => { *a += 1; format!("{}-{}", id, a - 1); return }
}
map.insert(id.clone(), 1);
```
?

(Not that performance matters much here.)