Skip to content

Commit 78978ba

Browse files
authored
fix: dangling pointer issues in update(data: Data) (#2)
1 parent 46a0d83 commit 78978ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/BLAKE3/BLAKE3.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public final class BLAKE3 {
5353
/// hasher.update(data: data)
5454
/// ```
5555
public func update(data: Data) {
56-
update(bytes: data.withUnsafeBytes { $0 })
56+
data.withUnsafeBytes { update(bytes: $0 ) }
5757
}
5858

5959
/// Finalize the hasher and return the hash as a buffer of bytes.

0 commit comments

Comments
 (0)