Sebastian Brunner
05/05/2022, 12:22 PM@NonExhaustive
which forces you to define an else
branch even if you cover all enums in your when clause.
See Rust docs: https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute
Here's their original RFC from 2008: https://github.com/rust-lang/rfcs/blob/master/text/2008-non-exhaustive.mdjw
05/05/2022, 12:39 PMSebastian Brunner
05/05/2022, 12:57 PMOrhan Tozan
05/06/2022, 9:39 AMDan Fingal-Surma
05/07/2022, 3:06 AM