• 0 Posts
  • 3 Comments
Joined 3 years ago
cake
Cake day: June 22nd, 2023

help-circle

  • locuester@lemmy.ziptoProgrammer Humor@lemmy.mlrustmas
    link
    fedilink
    English
    arrow-up
    34
    ·
    24 days ago

    Box is a bad example; it always has a value and can’t be unwrapped. It’s Result<T> and Option<T> that are the primary wrappers.

    Result is for Errors, and Option is for nullables. If you consider it that way, the “issues” with unwrap are identical to other languages when errors and nulls aren’t properly handled.