Change var to let

Xcode no more signals wrong side-effect in withUnsafeBytes.
This commit is contained in:
Davide De Rosa 2019-09-17 16:08:33 +02:00
parent d529744e81
commit d815f5222f
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ public class DNSResolver {
}
var ipAddresses: [String] = []
for case var rawAddress as Data in rawAddresses {
for case let rawAddress as Data in rawAddresses {
var ipAddress = [CChar](repeating: 0, count: Int(NI_MAXHOST))
let result: Int32 = rawAddress.withUnsafeBytes {
let addr = $0.bindMemory(to: sockaddr.self).baseAddress!