Skip to content

Commit

Permalink
fix: Don't use borrowing when copying
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Dec 20, 2024
1 parent 36a6330 commit 0ebf103
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public extension ArrayBufferHolder {
/**
* Copy the given `ArrayBufferHolder` into a new **owning** `ArrayBufferHolder`.
*/
static func copy(of other: borrowing ArrayBufferHolder) -> ArrayBufferHolder {
static func copy(of other: ArrayBufferHolder) -> ArrayBufferHolder {
let data = UnsafeMutablePointer<UInt8>.allocate(capacity: other.size)
let pointer = other.data.assumingMemoryBound(to: UInt8.self)
data.initialize(from: pointer, count: other.size)
Expand Down

0 comments on commit 0ebf103

Please sign in to comment.