Skip to content

Commit de759b7

Browse files
committed
Fix Swift 5.9 warning
1 parent 3526a94 commit de759b7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

SwiftDraw/CGPath+Segment.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ import UIKit
4141
extension CGPath {
4242
func doApply(action: @escaping (CGPathElement)->()) {
4343
var action = action
44-
apply(info: &action) {
45-
let action = $0!.bindMemory(to: ((CGPathElement)->()).self, capacity: 1).pointee
46-
action($1.pointee)
44+
withUnsafeMutablePointer(to: &action) { action in
45+
apply(info: action) {
46+
let action = $0!.bindMemory(to: ((CGPathElement)->()).self, capacity: 1).pointee
47+
action($1.pointee)
48+
}
4749
}
4850
}
4951
}

0 commit comments

Comments
 (0)