A

Admin • 833.24K Points
Coach

Q. What does the `unwrap()` method do in Rust?

  • (A) Deletes the value
  • (B) Wraps the value in an Option
  • (C) Extracts the value or panics if None
  • (D) Replaces the value
  • Correct Answer - Option(C)
  • Views: 31
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin

`unwrap()` extracts the value from an Option or panics if it is None.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.