@@ -34,23 +34,23 @@ public extension DispatchIO {
34
34
public static let strictInterval = IntervalFlags ( rawValue: 1 )
35
35
}
36
36
37
- public class func read( fromFileDescriptor: Int32 , maxLength: Int , runningHandlerOn queue: DispatchQueue , handler: ( data: DispatchData , error: Int32 ) -> Void ) {
37
+ public class func read( fromFileDescriptor: Int32 , maxLength: Int , runningHandlerOn queue: DispatchQueue , handler: ( _ data: DispatchData , _ error: Int32 ) -> Void ) {
38
38
dispatch_read ( fromFileDescriptor, maxLength, queue. __wrapped) { ( data: dispatch_data_t , error: Int32 ) in
39
- handler ( data : DispatchData ( data: data) , error : error)
39
+ handler ( DispatchData ( data: data) , error)
40
40
}
41
41
}
42
42
43
- public class func write( toFileDescriptor: Int32 , data: DispatchData , runningHandlerOn queue: DispatchQueue , handler: ( data: DispatchData ? , error: Int32 ) -> Void ) {
43
+ public class func write( toFileDescriptor: Int32 , data: DispatchData , runningHandlerOn queue: DispatchQueue , handler: ( _ data: DispatchData ? , _ error: Int32 ) -> Void ) {
44
44
dispatch_write ( toFileDescriptor, data. __wrapped. __wrapped, queue. __wrapped) { ( data: dispatch_data_t ? , error: Int32 ) in
45
- handler ( data: data . flatMap { DispatchData ( data: $0) } , error : error)
45
+ handler ( data. flatMap { DispatchData ( data: $0) } , error)
46
46
}
47
47
}
48
48
49
49
public convenience init (
50
50
type: StreamType ,
51
51
fileDescriptor: Int32 ,
52
52
queue: DispatchQueue ,
53
- cleanupHandler: ( error: Int32 ) -> Void )
53
+ cleanupHandler: ( _ error: Int32 ) -> Void )
54
54
{
55
55
self . init ( __type: type. rawValue, fd: fileDescriptor, queue: queue, handler: cleanupHandler)
56
56
}
@@ -61,7 +61,7 @@ public extension DispatchIO {
61
61
oflag: Int32 ,
62
62
mode: mode_t ,
63
63
queue: DispatchQueue ,
64
- cleanupHandler: ( error: Int32 ) -> Void )
64
+ cleanupHandler: ( _ error: Int32 ) -> Void )
65
65
{
66
66
self . init ( __type: type. rawValue, path: path, oflag: oflag, mode: mode, queue: queue, handler: cleanupHandler)
67
67
}
@@ -70,20 +70,20 @@ public extension DispatchIO {
70
70
type: StreamType ,
71
71
io: DispatchIO ,
72
72
queue: DispatchQueue ,
73
- cleanupHandler: ( error: Int32 ) -> Void )
73
+ cleanupHandler: ( _ error: Int32 ) -> Void )
74
74
{
75
75
self . init ( __type: type. rawValue, io: io, queue: queue, handler: cleanupHandler)
76
76
}
77
77
78
- public func read( offset: off_t , length: Int , queue: DispatchQueue , ioHandler: ( done: Bool , data: DispatchData ? , error: Int32 ) -> Void ) {
78
+ public func read( offset: off_t , length: Int , queue: DispatchQueue , ioHandler: ( _ done: Bool , _ data: DispatchData ? , _ error: Int32 ) -> Void ) {
79
79
dispatch_io_read ( self . __wrapped, offset, length, queue. __wrapped) { ( done: Bool , data: dispatch_data_t ? , error: Int32 ) in
80
- ioHandler ( done: done , data: data . flatMap { DispatchData ( data: $0) } , error : error)
80
+ ioHandler ( done, data. flatMap { DispatchData ( data: $0) } , error)
81
81
}
82
82
}
83
83
84
- public func write( offset: off_t , data: DispatchData , queue: DispatchQueue , ioHandler: ( done: Bool , data: DispatchData ? , error: Int32 ) -> Void ) {
84
+ public func write( offset: off_t , data: DispatchData , queue: DispatchQueue , ioHandler: ( _ done: Bool , _ data: DispatchData ? , _ error: Int32 ) -> Void ) {
85
85
dispatch_io_write ( self . __wrapped, offset, data. __wrapped. __wrapped, queue. __wrapped) { ( done: Bool , data: dispatch_data_t ? , error: Int32 ) in
86
- ioHandler ( done: done , data: data . flatMap { DispatchData ( data: $0) } , error : error)
86
+ ioHandler ( done, data. flatMap { DispatchData ( data: $0) } , error)
87
87
}
88
88
}
89
89
0 commit comments