Skip to content

Commit be1ea5e

Browse files
committed
---
yaml --- r: 319391 b: refs/heads/master-rebranch c: 2c1f5c1 h: refs/heads/master i: 319389: 8cafcbf 319387: 688eabb 319383: c94299e 319375: f811e72 319359: f217dc4
1 parent d07b5c9 commit be1ea5e

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,4 +1457,4 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14571457
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14581458
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14591459
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1460-
refs/heads/master-rebranch: 15d5fc52cff8cbf09374f8e9ef1e91acc2815850
1460+
refs/heads/master-rebranch: 2c1f5c108e8b233d0f7c842a01645b6dfb3fbdc4

branches/master-rebranch/stdlib/public/Darwin/Network/NWEndpoint.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ public struct IPv4Address: IPAddress, Hashable, CustomDebugStringConvertible {
215215
if rawValue.count != MemoryLayout<in_addr>.size {
216216
return nil
217217
}
218-
let v4 = rawValue.withUnsafeBytes { (ptr: UnsafePointer<in_addr>) -> in_addr in
219-
return ptr.pointee
220-
}
218+
let v4 = rawValue.withUnsafeBytes { $0.load(as: in_addr.self) }
221219
self.init(v4, interface)
222220
}
223221

@@ -381,9 +379,7 @@ public struct IPv6Address: IPAddress, Hashable, CustomDebugStringConvertible {
381379
if rawValue.count != MemoryLayout<in6_addr>.size {
382380
return nil
383381
}
384-
let v6 = rawValue.withUnsafeBytes { (ptr: UnsafePointer<in6_addr>) -> in6_addr in
385-
return ptr.pointee
386-
}
382+
let v6 = rawValue.withUnsafeBytes { $0.load(as: in6_addr.self) }
387383
self.init(v6, interface)
388384
}
389385

0 commit comments

Comments
 (0)