File tree 1 file changed +3
-10
lines changed
Sources/Testing/Support/Additions
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,13 @@ extension Result {
13
13
///
14
14
/// - Warning: This function is used to implement the `#expect()` and
15
15
/// `#require()` macros. Do not call it directly.
16
- public func __expected( ) { }
16
+ @ inlinable public func __expected( ) { }
17
17
18
18
/// Handle this instance as if it were returned from a call to `#require()`.
19
19
///
20
20
/// - Warning: This function is used to implement the `#expect()` and
21
21
/// `#require()` macros. Do not call it directly.
22
- public func __required( ) throws -> Success {
23
- /// `get()` is current broken in the Swift standard library, so switch
24
- /// manually to work around the problem. ([122797397](rdar://122797397))
25
- switch self {
26
- case let . success( result) :
27
- return result
28
- case let . failure( error) :
29
- throw error
30
- }
22
+ @inlinable public func __required( ) throws -> Success {
23
+ try get ( )
31
24
}
32
25
}
You can’t perform that action at this time.
0 commit comments