This repository was archived by the owner on Dec 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 8585 guard let pointer = buffer. baseAddress
8686 else { self . init ( ) ; return }
8787
88- self . init ( bytes: pointer, count: sizeof ( SourceType . self ) * buffer. count)
88+ self . init ( bytes: pointer, count: MemoryLayout < SourceType > . size * buffer. count)
8989 }
9090
9191 // MARK: - Accessors
Original file line number Diff line number Diff line change 1010public func Hash( _ data: Data ) -> Int {
1111
1212 // more expensive than casting but that's not safe for large values.
13- return data. bytes. map ( { Int ( $0) } ) . reduce ( 0 , { $0. 0 ^ $0. 1 } )
13+ return data. bytes. map ( { Int ( $0) } ) . reduce ( 0 ) { $0. 0 ^ $0. 1 }
1414}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public extension JSON.Value {
2727 // could not parse
2828 guard tokenerError != nil else { return nil }
2929
30- self = self . dynamicType . init ( jsonObject: jsonObject)
30+ self . init ( jsonObject: jsonObject)
3131 }
3232}
3333
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public final class Thread {
2121
2222 // MARK: - Intialization
2323
24- public init ( _ closure: ( ) -> ( ) ) throws {
24+ public init ( _ closure: @escaping ( ) -> ( ) ) throws {
2525
2626 let holder = Unmanaged . passRetained ( Closure ( closure: closure) )
2727
@@ -116,7 +116,7 @@ fileprivate extension Thread {
116116
117117 let closure : ( ) -> ( )
118118
119- init ( closure: ( ) -> ( ) ) {
119+ init ( closure: @escaping ( ) -> ( ) ) {
120120
121121 self . closure = closure
122122 }
You can’t perform that action at this time.
0 commit comments