SPB Git

spb/os-vault Public

Self-custody, multi-chain crypto wallet for macOS. One recovery phrase, six chain families, zero API keys — nothing leaves your Mac.

Swift 96% Shell 3.4% Makefile 0.6%
293 B · 12 lines swift
Raw Blame History
1import Foundation23infix operator ?!: NilCoalescingPrecedence45/// Throws the right hand side error if the left hand side optional is `nil`.6func ?! <T>(value: T?, error: @autoclosure () -> Error) throws -> T {7    guard let value = value else {8        throw error()9    }10    return value11}12