|
|
|
|
|
by Defletter
449 days ago
|
|
It's certainly cleaner, but my immediate thought when reading was "that's a compile error" because it looks like it's declaring a variable with a type mismatch. This is where, in other languages, the "case" keyword (or similar) comes in handy (eg: Dart's if-case syntax[1]), except Rust doesn't have that because of its headlong pursuit of 'conciseness'. - [1] https://github.com/dart-lang/language/issues/2181 |
|