Skip to content

Commit 53605e4

Browse files
committed
Slight Doc Rewrite
1 parent 72c15c9 commit 53605e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/CodeEditSourceEditor/Enums/CaptureModifier.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ public struct CaptureModifierSet: OptionSet, Equatable, Hashable, Sendable {
115115
var rawValue = self.rawValue
116116

117117
// This set is represented by an integer, where each `1` in the binary number represents a value.
118-
// We can treat the index of the `1` as the raw value of a ``CaptureModifier`` (the index in 0b0100 would be 2).
119-
// This loops through each `1` in the `rawValue`, finds the represented modifier, and 0's out the `1` so we can
120-
// get the next one using the binary & operator (0b0110 -> 0b0100 -> 0b0000 -> finish).
118+
// We can interpret the index of the `1` as the raw value of a ``CaptureModifier`` (the index in 0b0100 would
119+
// be 2). This loops through each `1` in the `rawValue`, finds the represented modifier, and 0's out the `1` so
120+
// we can get the next one using the binary & operator (0b0110 -> 0b0100 -> 0b0000 -> finish).
121121
var values: [Int8] = []
122122
while rawValue > 0 {
123123
values.append(Int8(rawValue.trailingZeroBitCount))
124-
// Clears the bit at the desired index (0b011 & 0b110 = 0b010 if clearing index 0)
124+
// Clears the bit at the desired index (eg: 0b110 if clearing index 0)
125125
rawValue &= ~UInt(1 << rawValue.trailingZeroBitCount)
126126
}
127127
return values.compactMap({ CaptureModifier(rawValue: $0) })

0 commit comments

Comments
 (0)