I'm missing the vocabulary for googling this.
Is there a better way to write this? I want to filter a vector of enums to elements that match one specific pattern.
.filter(|r| match r.kind {
RoomKind::BedRoom(_) => true,
_ => false
})
#rust #dev
https://pouet.chapril.org/@sgued/113760509761590061
Thanks! That is what I was looking for.
@h4kor I think clippy would suggest it to you.