From 3a7750500962792d9e00880e798799cb925f7056 Mon Sep 17 00:00:00 2001 From: Ron Pinz Date: Sun, 20 May 2018 13:40:23 -0400 Subject: [PATCH] eliminate warnings for Swift 4.1 --- Sources/BCrypt/Hash.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sources/BCrypt/Hash.swift b/Sources/BCrypt/Hash.swift index 5f76335..593aabc 100644 --- a/Sources/BCrypt/Hash.swift +++ b/Sources/BCrypt/Hash.swift @@ -40,11 +40,21 @@ public final class Hash { } deinit { + #if swift(>=4.1) + p.deinitialize(count: Key.p.count) + p.deallocate() + #else p.deinitialize() p.deallocate(capacity: Key.p.count) + #endif + #if swift(>=4.1) + s.deinitialize(count: Key.s.count) + s.deallocate() + #else s.deinitialize() s.deallocate(capacity: Key.s.count) + #endif } public func digest(message: Bytes) -> Bytes {