Post #2227741
2025-11-19 09:45 UTC
@Mara@hachyderm.io this sounds much more descriptive! But how would it play with the existing .or() and .or_else(), which return another Option/Result? If those didn't exist, then renaming all .unwrap_or_*() to .or_*() would make it all nice and consistent. But those are taken, and keeping .unwrap_or_*() alongside .or_panic() seems to introduce a new inconsistency 🤔
Replies (2)
-
@zimzat@mastodon.social 2025-11-19 09:59
@azymohliad@fosstodon.org @Mara@hachyderm.io What about `ok_or_panic`? It's both explicit and a nod to its enum name.
-
@Mara@hachyderm.io 2025-11-19 10:05
@azymohliad@fosstodon.org Time for Rust 3.0.