Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ppamorim committed May 16, 2021
1 parent 60d1221 commit c5e10b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions Sources/Skynet/Model/SkynetUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,12 @@ struct NaclUtilP {
}

public static func randomBytes(length: Int) throws -> Data {
var data = Data(count: length)
let result = data.withUnsafeMutableBytes {
SecRandomCopyBytes(kSecRandomDefault, length, $0)
}
var bytes: [UInt8] = [UInt8](repeating: 0, count: 32)
let result: Int32 = SecRandomCopyBytes(kSecRandomDefault, bytes.count, &bytes)
guard result == errSecSuccess else {
throw(NaclUtilError.internalError)
throw NaclUtilError.internalError
}

return data
return Data(bytes)
}

}
2 changes: 1 addition & 1 deletion Sources/Skynet/SkyDB.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class SkyDB {
switch registryResult {
case .success(let signedRegistryEntry):
revision = signedRegistryEntry.entry.revision + 1
case .failure(let error):
case .failure(_):
// print(error)
break
}
Expand Down

0 comments on commit c5e10b3

Please sign in to comment.