bezierpath-length
bezierpath-length copied to clipboard
Compiler Error PathElement Line 61
https://github.com/louisdh/bezierpath-length/blob/b007af75ab55daabaf34c6e8d2081395730ec92b/Source/PathElement.swift#L61
self.apply(info: unsafeBitCast(applier, to: UnsafeMutableRawPointer.self), function: unsafeBitCast(callback, to: CGPathApplierFunction.self))
This code throws a compiler error: "Converting non-escaping value to 'T' may allow it to escape"
Any suggestions on how to resolve this?
Thanks!
fileprivate func apply(with applier: PathApplier)
change it to
fileprivate func apply(with applier:@escaping PathApplier)