Skip to content

Commit 6dfb66f

Browse files
authored
Merge pull request #24 from milseman/i_spi_something_string
Switch off of String SPI (which is going away)
2 parents 4cca45e + 1898700 commit 6dfb66f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

PlaygroundLogger/PlaygroundLogger/ExtensionString.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ extension String : Serializable {
5353
}
5454

5555
init (rawBytes: [UInt8]) {
56-
self = rawBytes.withUnsafeBufferPointer { (storage : UnsafeBufferPointer<UInt8>) in
57-
return String._fromCodeUnitSequenceWithRepair(UTF8.self, input: storage).0
58-
}
56+
self = String(decoding: rawBytes, as: UTF8.self)
5957
}
6058

6159
init? (storage: BytesStorage) {

0 commit comments

Comments
 (0)