Skip to content

Commit f9d63c8

Browse files
committed
Fixed warnings due to usage of the now-deprecated UnsafeMutablePointer.deallocate(capacity:) in the legacy test code.
1 parent d3f9a33 commit f9d63c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PlaygroundLogger/PlaygroundLoggerTests/LegacyPlaygroundLoggerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ extension UInt64 {
812812
init? (eightBytesStorage: BytesStorage) {
813813
if !eightBytesStorage.has(8) { return nil }
814814
var up_byte = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
815-
defer { up_byte.deallocate(capacity: 8) }
815+
defer { up_byte.deallocate() }
816816
for idx in 0..<8 {
817817
up_byte[idx] = eightBytesStorage.get()
818818
}
@@ -878,7 +878,7 @@ extension Bool {
878878
extension Float {
879879
init? (storage: BytesStorage) {
880880
var ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 4)
881-
defer { ubPtr.deallocate(capacity: 4) }
881+
defer { ubPtr.deallocate() }
882882
for idx in 0..<4 {
883883
ubPtr[idx] = storage.get()
884884
}
@@ -893,7 +893,7 @@ extension Float {
893893
extension Double {
894894
init? (storage: BytesStorage) {
895895
var ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
896-
defer { ubPtr.deallocate(capacity: 8) }
896+
defer { ubPtr.deallocate() }
897897
for idx in 0..<8 {
898898
ubPtr[idx] = storage.get()
899899
}

0 commit comments

Comments
 (0)