Skip to content

Commit 691eb06

Browse files
Merge pull request #225 from kocherovets/master
Update Extensions.swift
2 parents 9f3fb48 + c2a141b commit 691eb06

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)