UnwrapOrThrow

1.0.1

Frizlab/UnwrapOrThrow

What's New

UnwrapOrThrow 1.0.1

2024-04-09T13:06:50Z

UnwrapOrThrow

This is a micro-package which simply create the ?! operator and the unwrap(orThrow:) convenience on Optional.

Usage

struct VarIsNil : Error {}
let myOptionalVar: Int? = nil
let nonOptionalOrThrow1 = try myOptionalVar ?! VarIsNil()
let nonOptionalOrThrow2 = try myOptionalVar.unwrap(orThrow: VarIsNil())

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Apr 09 2024 20:52:04 GMT-0900 (Hawaii-Aleutian Daylight Time)