Added UnsignedInteger stubs to Failable<UnsignedInteger, T> type

This commit is contained in:
Caleb Kleveter 2018-11-29 14:00:22 -06:00
parent 8b8b30b4dd
commit f80f5cec56
No known key found for this signature in database
GPG Key ID: B38DBD5CF2C98D69
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
extension Failable where T: UnsignedInteger {
/// See [`UnsignedInteger.magnitude`](https://developer.apple.com/documentation/swift/unsignedinteger/2884378-magnitude)
///
/// - Warning: This property has no failing options, so your program will crash if it produces a value that does not pass validation.g
public var magnitude: Failable<T, Validations> {
return try! Failable(self.value.magnitude)
}
}