Skip to content

Frizlab/UnwrapOrThrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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())

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages