I got Xcode warning :
"'withUnsafeBytes' is deprecated: use withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R instead"
The code is :
_document = data.withUnsafeBytes({ (p: UnsafePointer<Int8>) -> htmlDocPtr? in
return htmlReadMemory(p, Int32(data.count), nil, nil, 0)
})
I'm more objective-c guy, and I stumble for 1 hour to shutdown this warning but no luck Any ideas ?
I already checked this answer : Swift 5.0: 'withUnsafeBytes' is deprecated: use `withUnsafeBytes<R>(...)
EDIT:
Also checked this and got the same warning :
https://github.com/leonbreedt/FavIcon/issues/23#issue-365477776