fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Tomáš Zemanovič

TIL in pattern matches with guards don’t get the benefit of `unmatched_patterns` analysis. In hindsight it makes sense as it would need to be able to evaluate them, so imho in practice it’s better to avoid them for more complex patterns. Related, you don’t get exhaustivity check for guards either.

```
match i {
i if i > 1 => {}
// no `unmatched_patterns` warning
i if i > 1 => {}
_ => {}
}
```