Rust Error Return Check Policy


  • Never use unwrap on Result. If the type is Err, it will panic and crash the program. The only exception is if it has already been checked for error previously or in test code.
  • Never use unwrap on Option for the same reason if the type is None as Result is Err.