all 11 comments

sorted by: hot top controversial new old
[–] 99 points 9 months ago (8 children)

can you explain the joke, i work at cloudflare

  • source
  • hideshow 8 child comments
  • [–] 46 points 9 months ago (5 children)

    Rust has many container-like objects that may or may contain a value, like Box. Most of these have an unwrap() method that either obtains the inner value or panics the whole application.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 34 points 9 months ago

    Box is a bad example; it always has a value and can’t be unwrapped. It’s Result and Option 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.

  • source
  • parent
  • [–] 9 points 9 months ago

    It is Christmas morning and I am fucking panicking

  • source
  • [–] 8 points 9 months ago

    .unwrap_or_ruin_christmas()

  • source