[BitCollections] Adopt some instead of classic generic where possible

This commit is contained in:
Karoy Lorentey committed 2024-01-30 18:07:00 -08:00
1 parent ad4ecc3d0f
commit db3bd17b40
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() }