Post #2227732
2025-11-19 09:07 UTC
@ygor@floss.social @Mara@hachyderm.io
On an `Option`, the output type of `unwrap_or_default` is `T`.
The output type of `unwrap_or_panic` would also be `T`.
Or am I missing something?
Replies (1)
-
@ygor@floss.social 2025-11-19 09:23
@tdelmas@mamot.fr @Mara@hachyderm.io yes, unwrap_or_panic() would be consistent, but or_panic() as proposed would not, as it looks like or() and or_else(). The question is, is the problem the "unwrap" terminology, or that it isn't clear enough which methods can panic? Or both?