File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -189,11 +189,11 @@ public final class NIOLoopBoundBox<Value>: @unchecked Sendable {
189189 /// - Returns: The value returned by the `handler` closure.
190190 /// - Note: This method is particularly useful when you need to perform read and write operations
191191 /// on the value because it reduces the on EventLoop checks.
192- public func withValue< T, E: Error > ( _ handler: ( inout Value ) throws ( E ) -> T ) throws ( E) -> T {
192+ public func withValue< Success, Failure: Error > (
193+ _ handler: ( inout Value ) throws ( Failure ) -> Success
194+ ) throws ( Failure) -> Success {
193195 self . eventLoop. preconditionInEventLoop ( )
194- var value = self . _value
195- defer { self . _value = value }
196- return try handler ( & value)
196+ return try handler ( & self . _value)
197197 }
198198 #endif
199199}
You can’t perform that action at this time.
0 commit comments