mirror of
https://github.com/apple/swift-collections
synced 2026-11-28 05:04:21 +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
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user