mirror of
https://github.com/apple/swift-collections
synced 2026-11-29 05:14:20 +00:00
[BitCollections] Adopt some instead of classic generic where possible
This commit is contained in:
26 files changed
+234
-229
No files matched your search
@@ -24,9 +24,9 @@ extension BitArray {
|
||||
///
|
||||
/// - Parameter count: The number of random bits to generate.
|
||||
/// - Parameter rng: The random number generator to use.
|
||||
public static func randomBits<R: RandomNumberGenerator>(
|
||||
public static func randomBits(
|
||||
count: Int,
|
||||
using rng: inout R
|
||||
using rng: inout some RandomNumberGenerator
|
||||
) -> BitArray {
|
||||
precondition(count >= 0, "Invalid count")
|
||||
guard count > 0 else { return BitArray() }
|
||||
|
||||
Reference in new issue
Block a user