瀏覽代碼

alignof -> MemoryLayout<T>.alignment

Marcin Krzyżanowski 9 年之前
父節點
當前提交
349486b595
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      CryptoSwiftTests/HashTests.swift

+ 1 - 1
CryptoSwiftTests/HashTests.swift

@@ -59,7 +59,7 @@ final class CryptoSwiftTests: XCTestCase {
             self.stopMeasuring()
             self.stopMeasuring()
             md.deallocate(capacity: Int(CC_MD5_DIGEST_LENGTH))
             md.deallocate(capacity: Int(CC_MD5_DIGEST_LENGTH))
             md.deinitialize()
             md.deinitialize()
-            buf.deallocate(bytes: 1024 * 1024, alignedTo: alignof(UInt8.self))
+            buf.deallocate(bytes: 1024 * 1024, alignedTo: MemoryLayout<UInt8>.alignment)
         })
         })
     }
     }