33/// `require` will return the result of the expression if the matcher passes, and throw an error if not.
44/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
55@discardableResult
6- public func require< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure @escaping ( ) throws -> sending T? ) -> SyncRequirement < T > {
6+ public func require< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure @escaping @ Sendable ( ) throws -> sending T? ) -> SyncRequirement < T > {
77 return SyncRequirement (
88 expression: Expression (
99 expression: expression,
@@ -17,7 +17,7 @@ public func require<T>(fileID: String = #fileID, file: FileString = #filePath, l
1717/// `require` will return the result of the expression if the matcher passes, and throw an error if not.
1818/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
1919@discardableResult
20- public func require< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending T) ) -> SyncRequirement < T > {
20+ public func require< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending T) ) -> SyncRequirement < T > {
2121 return SyncRequirement (
2222 expression: Expression (
2323 expression: expression ( ) ,
@@ -31,7 +31,7 @@ public func require<T>(fileID: String = #fileID, file: FileString = #filePath, l
3131/// `require` will return the result of the expression if the matcher passes, and throw an error if not.
3232/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
3333@discardableResult
34- public func require< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending T? ) ) -> SyncRequirement < T > {
34+ public func require< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending T? ) ) -> SyncRequirement < T > {
3535 return SyncRequirement (
3636 expression: Expression (
3737 expression: expression ( ) ,
@@ -45,7 +45,7 @@ public func require<T>(fileID: String = #fileID, file: FileString = #filePath, l
4545/// `require` will return the result of the expression if the matcher passes, and throw an error if not.
4646/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
4747@discardableResult
48- public func require( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending Void) ) -> SyncRequirement < Void > {
48+ public func require( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending Void) ) -> SyncRequirement < Void > {
4949 return SyncRequirement (
5050 expression: Expression (
5151 expression: expression ( ) ,
@@ -61,7 +61,7 @@ public func require(fileID: String = #fileID, file: FileString = #filePath, line
6161///
6262/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``.
6363@discardableResult
64- public func requires< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure @escaping ( ) throws -> sending T? ) -> SyncRequirement < T > {
64+ public func requires< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure @escaping @ Sendable ( ) throws -> sending T? ) -> SyncRequirement < T > {
6565 return SyncRequirement (
6666 expression: Expression (
6767 expression: expression,
@@ -77,7 +77,7 @@ public func requires<T>(fileID: String = #fileID, file: FileString = #filePath,
7777///
7878/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``.
7979@discardableResult
80- public func requires< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending T) ) -> SyncRequirement < T > {
80+ public func requires< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending T) ) -> SyncRequirement < T > {
8181 return SyncRequirement (
8282 expression: Expression (
8383 expression: expression ( ) ,
@@ -93,7 +93,7 @@ public func requires<T>(fileID: String = #fileID, file: FileString = #filePath,
9393///
9494/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``.
9595@discardableResult
96- public func requires< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending T? ) ) -> SyncRequirement < T > {
96+ public func requires< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending T? ) ) -> SyncRequirement < T > {
9797 return SyncRequirement (
9898 expression: Expression (
9999 expression: expression ( ) ,
@@ -109,7 +109,7 @@ public func requires<T>(fileID: String = #fileID, file: FileString = #filePath,
109109///
110110/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``.
111111@discardableResult
112- public func requires( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending Void) ) -> SyncRequirement < Void > {
112+ public func requires( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending Void) ) -> SyncRequirement < Void > {
113113 return SyncRequirement (
114114 expression: Expression (
115115 expression: expression ( ) ,
@@ -216,7 +216,7 @@ public func requirea<T: Sendable>(fileID: String = #fileID, file: FileString = #
216216/// `unwrap` will return the result of the expression if it is non-nil, and throw an error if the value is nil.
217217/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
218218@discardableResult
219- public func unwrap< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure @escaping ( ) throws -> sending T? ) throws -> T {
219+ public func unwrap< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure @escaping @ Sendable ( ) throws -> sending T? ) throws -> T {
220220 try requires ( fileID: fileID, file: file, line: line, column: column, customError: customError, expression ( ) ) . toNot ( beNil ( ) , description: description)
221221}
222222
@@ -226,7 +226,7 @@ public func unwrap<T>(fileID: String = #fileID, file: FileString = #filePath, li
226226/// `unwrap` will return the result of the expression if it is non-nil, and throw an error if the value is nil.
227227/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
228228@discardableResult
229- public func unwrap< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending T? ) ) throws -> T {
229+ public func unwrap< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending T? ) ) throws -> T {
230230 try requires ( fileID: fileID, file: file, line: line, column: column, customError: customError, expression ( ) ) . toNot ( beNil ( ) , description: description)
231231}
232232
@@ -236,7 +236,7 @@ public func unwrap<T>(fileID: String = #fileID, file: FileString = #filePath, li
236236/// `unwraps` will return the result of the expression if it is non-nil, and throw an error if the value is nil.
237237/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
238238@discardableResult
239- public func unwraps< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure @escaping ( ) throws -> sending T? ) throws -> T {
239+ public func unwraps< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure @escaping @ Sendable ( ) throws -> sending T? ) throws -> T {
240240 try requires ( fileID: fileID, file: file, line: line, column: column, customError: customError, expression ( ) ) . toNot ( beNil ( ) , description: description)
241241}
242242
@@ -246,7 +246,7 @@ public func unwraps<T>(fileID: String = #fileID, file: FileString = #filePath, l
246246/// `unwraps` will return the result of the expression if it is non-nil, and throw an error if the value is nil.
247247/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown.
248248@discardableResult
249- public func unwraps< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure ( ) -> sending ( ( ) throws -> sending T? ) ) throws -> T {
249+ public func unwraps< T> ( fileID: String = #fileID, file: FileString = #filePath, line: UInt = #line, column: UInt = #column, customError: Error ? = nil , description: String ? = nil , _ expression: @autoclosure ( ) -> ( @ Sendable ( ) throws -> sending T? ) ) throws -> T {
250250 try requires ( fileID: fileID, file: file, line: line, column: column, customError: customError, expression ( ) ) . toNot ( beNil ( ) , description: description)
251251}
252252
0 commit comments