See my example. I am trying to extract the value of an optional field in the enum. That's where the unwrap comes in.
The snippet you link to should be replaceable by something along the lines of
match &passages.asset {
TranscriptionAsset::Track {
artist_name: Some(artist_name),
..
} => {
metadata
.entry(ARTIST_METADATA.to_string())
.or_default()
.push(artist_name.clone());
}
_ => {}
}
no `unwrap` needed. I don't know where you got that idea.