[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

@@ -32,10 +32,15 @@ extension BitArray {
}
}
public mutating func fill<R: RangeExpression>(
in range: R,
/// Set every bit of this array within the specified range to `value`
/// (`true` by default).
///
/// - Parameter range: The range whose elements to overwrite.
/// - Parameter value: The Boolean value to which to set the array's elements.
public mutating func fill(
in range: some RangeExpression<Int>,
with value: Bool = true
) where R.Bound == Int {
) {
fill(in: range.relative(to: self), with: value)
}
}