Hacker News new | ask | show | jobs
by iBelieve 2770 days ago
The way I do this in Rust is `Some(...).filter(...)`. I personally like this over having generic extensions, as it makes it very clear that its doing filtering that produces an optional, rather than filtering through a list or other iterable.