Post #2564792
2026-04-29 20:58 UTC
@Ambraven@social.mochi.academy With more than one optional parameter, I think it would be clearer like this. (I think it's best not to use unwrap() except in tests.) But it might be better to try to redesign things so you don't need the options.
Replies (1)
-
@Ambraven@social.mochi.academy 2026-04-29 21:21
@benjamingeer@piaille.fr In this case I don't think unwrap is bad since it can't be none at this point in the code. I would probably still use expect or '?' in production. I like the use of match but it's going to grow really quick if you add parameter. It probably should never have to scale if we're being a bit real.