Skip to content

Commit c2a141b

Browse files
authored
Update Extensions.swift
fix
1 parent a45f86b commit c2a141b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/web3swift/EthereumAddress/Extensions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import Foundation
1010

1111
extension Array where Element == UInt8 {
1212
init(hex: String) {
13-
self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount)
13+
self.init()
14+
self.reserveCapacity(hex.unicodeScalars.lazy.underestimatedCount)
1415
var buffer: UInt8?
1516
var skip = hex.hasPrefix("0x") ? 2 : 0
1617
for char in hex.unicodeScalars.lazy {

0 commit comments

Comments
 (0)