Pārlūkot izejas kodu

Update Playground code to new Foundation syntax

Marcin Krzyżanowski 9 gadi atpakaļ
vecāks
revīzija
1feb35ebba
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      CryptoSwift.playground/Contents.swift

+ 2 - 2
CryptoSwift.playground/Contents.swift

@@ -44,7 +44,7 @@ do {
  */
 do {
     // write until all is written
-    func writeToStream(stream: NSOutputStream, bytes: Array<UInt8>) {
+    func writeToStream(stream: OutputStream, bytes: Array<UInt8>) {
         var writtenCount = 0
         while stream.hasSpaceAvailable && writtenCount < bytes.count {
             let c = stream.write(bytes, maxLength: bytes.count)
@@ -62,7 +62,7 @@ do {
     // prepare streams
     let data = Data(bytes: (0..<100).map { $0 })
     let inputStream = InputStream(data: data)
-    let outputStream = NSOutputStream(toMemory: ())
+    let outputStream = OutputStream(toMemory: ())
     inputStream.open()
     outputStream.open()