Skip to content

Commit d6be972

Browse files
committed
Readability.
1 parent 3047eb7 commit d6be972

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Sources/DiffableTextKit/Models/Field.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ extension Field {
6868
//=--------------------------------------=
6969
// MARK: Single
7070
//=--------------------------------------=
71-
let upperBound = layout.index(at: destination.upperBound, start: selection.upperBound)
71+
let upperBound = layout.index(at: destination.upperBound, from: selection.upperBound)
7272
var lowerBound = upperBound
7373
//=--------------------------------------=
7474
// MARK: Double
7575
//=--------------------------------------=
7676
if !destination.isEmpty {
77-
lowerBound = layout.index(at: destination.lowerBound, start: selection.lowerBound)
77+
lowerBound = layout.index(at: destination.lowerBound, from: selection.lowerBound)
7878
}
7979
//=--------------------------------------=
8080
// MARK: Return

Sources/DiffableTextKit/Models/Layout.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ extension Layout {
154154
// MARK: Position
155155
//=------------------------------------------------------------------------=
156156

157-
@inlinable func index(at position: Position, start: Index) -> Index {
157+
@inlinable func index(at position: Position, from start: Index) -> Index {
158158
switch start.position <= position {
159159
case true: return index(after: start, while: { $0.position < position })
160160
case false: return index(before: start, while: { $0.position > position })

Sources/DiffableTextKit/Models/Position.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public struct Position<Scheme: DiffableTextKit.Scheme>: Comparable, ExpressibleB
5050
// MARK: Transformations
5151
//=------------------------------------------------------------------------=
5252

53-
@inlinable func after(_ character: Character) -> Self {
54-
Self(offset + Scheme.size(of: character))
53+
@inlinable func after(_ character: Character) -> Self {
54+
Self(offset + Scheme.size(of: character))
5555
}
5656

5757
@inlinable func before(_ character: Character) -> Self {

0 commit comments

Comments
 (0)