File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Sources/Web3Core/Structure Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ disabled_rules:
1010 - identifier_name
1111 - line_length
1212 - multiple_closures_with_trailing_closure
13- - todo
14- - indentation_width
13+ - todo
1514 - function_parameter_count
1615 - nesting
1716
@@ -29,6 +28,7 @@ opt_in_rules:
2928 - empty_string
3029 - closure_body_length
3130 - fallthrough
31+ - indentation_width
3232
3333# force warnings
3434force_cast : error
Original file line number Diff line number Diff line change @@ -133,11 +133,13 @@ extension SECP256K1 {
133133 let serializedPubkeyPointer = serializedPkRawPointer. assumingMemoryBound ( to: UInt8 . self)
134134 return withUnsafeMutablePointer ( to: & keyLength) { ( keyPtr: UnsafeMutablePointer < Int > ) -> Int32 in
135135 withUnsafeMutablePointer ( to: & publicKey) { ( pubKeyPtr: UnsafeMutablePointer < secp256k1_pubkey > ) -> Int32 in
136- let res = secp256k1_ec_pubkey_serialize ( context,
137- serializedPubkeyPointer,
138- keyPtr,
139- pubKeyPtr,
140- UInt32 ( compressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED) )
136+ let res = secp256k1_ec_pubkey_serialize (
137+ context,
138+ serializedPubkeyPointer,
139+ keyPtr,
140+ pubKeyPtr,
141+ UInt32 ( compressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED)
142+ )
141143 return res
142144 }
143145 }
@@ -152,8 +154,10 @@ extension SECP256K1 {
152154 }
153155
154156 internal static func parsePublicKey( serializedKey: Data ) -> secp256k1_pubkey ? {
155- guard let context = context,
156- serializedKey. count == 33 || serializedKey. count == 65 else {
157+ guard
158+ let context = context,
159+ ( serializedKey. count == 33 || serializedKey. count == 65 )
160+ else {
157161 return nil
158162 }
159163 let keyLen : Int = Int ( serializedKey. count)
You can’t perform that action at this time.
0 commit comments