UnwrapOrThrow

1.0.0

Frizlab/UnwrapOrThrow

What's New

UnwrapOrThrow 1.0

2023-01-01T10:36:17Z

UnwrapOrThrow

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

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: Mon Jan 09 2023 22:16:12 GMT-0500 (GMT-05:00)