Post #2564770
2026-04-29 15:24 UTC
@emily_s@mastodon.me.uk @Ambraven@social.mochi.academy there’s `.cloned()` on `Option` which will make this slightly shorter still.
Replies (1)
-
@pauldoo@mastodon.scot 2026-04-29 15:26
@emily_s@mastodon.me.uk @Ambraven@social.mochi.academy `foo.cloned().unwrap_or_else(A::new)` something like that…