Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
panny
· 1mo ago · 0 comments
I don't think you need those switch defaults with the sealed types. I didn't check with a compiler, but I think those are unnecessary.
Comments
[–]
thfuran
1mo ago
The switches with defaults are both switching over a String with only literal cases. That can't be exhaustive without a default, and switch expressions must be exhaustive.