Skip to content

Commit e6c4bcc

Browse files
Remove a few unneeded mutatings
1 parent b2faa47 commit e6c4bcc

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Sources/TextFormation/NewlineWithinPairFilter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public struct NewlineWithinPairFilter<Interface: TextSystemInterface> {
1313
}
1414

1515
extension NewlineWithinPairFilter: Filter {
16-
public mutating func processMutation(_ mutation: TextMutation<Interface>) throws -> Interface.Output? {
16+
public func processMutation(_ mutation: TextMutation<Interface>) throws -> Interface.Output? {
1717
let interface = mutation.interface
1818
let pos = mutation.range.lowerBound
1919

Sources/TextFormation/OpenPairReplacementFilter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public struct OpenPairReplacementFilter<Interface: TextSystemInterface> {
1111
}
1212

1313
extension OpenPairReplacementFilter: Filter {
14-
public mutating func processMutation(_ mutation: TextMutation<Interface>) throws -> Interface.Output? {
14+
public func processMutation(_ mutation: TextMutation<Interface>) throws -> Interface.Output? {
1515
let interface = mutation.interface
1616
let start = mutation.range.lowerBound
1717
let end = mutation.range.upperBound

Sources/TextFormation/StandardOpenPairFilter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ public struct StandardOpenPairFilter<Interface: TextSystemInterface> {
77
private let skip: SkipFilter<Interface>
88
private var closeWhitespace: LineLeadingWhitespaceFilter<Interface>?
99
private var closePair: ClosePairFilter<Interface>
10-
private var newlinePair: NewlineWithinPairFilter<Interface>
11-
private var openPairReplacement: OpenPairReplacementFilter<Interface>
10+
private let newlinePair: NewlineWithinPairFilter<Interface>
11+
private let openPairReplacement: OpenPairReplacementFilter<Interface>
1212
private let deleteClose: DeleteCloseFilter<Interface>
1313

1414
public init(open: String, close: String) {

0 commit comments

Comments
 (0)