Added behaviour comment to Failable<BinaryInteger, T>.init(exactly:) doc comment
This commit is contained in:
parent
19dc564012
commit
8b8b30b4dd
|
@ -28,6 +28,8 @@ extension Failable where T: BinaryInteger {
|
|||
}
|
||||
|
||||
/// See [`BinaryInteger.init(exactly:)`](https://developer.apple.com/documentation/swift/binaryinteger/2925955-init).
|
||||
///
|
||||
/// If an error is thrown by the `Failable` initializer, then this init will return `nil`.
|
||||
public init?<B>(exactly source: B) where B : BinaryFloatingPoint {
|
||||
guard let t = T(exactly: source) else { return nil }
|
||||
try? self.init(t)
|
||||
|
|
Loading…
Reference in New Issue