Skip to content

Commit 2978a4e

Browse files
committed
Cleanup
1 parent ba6f11c commit 2978a4e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Sources/DiffableTextKitXPattern/Style.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,8 @@ extension PatternTextStyle {
140140
//=------------------------------------------------------------------------=
141141

142142
/// - Mismatches throw an error.
143-
@inlinable public func resolve(_ proposal:
144-
Proposal, with cache: inout Void) throws -> Commit<Value> {
145-
let nonvirtuals = proposal.lazy.merged().nonvirtuals()
146-
return try reduce(with: nonvirtuals, into: Commit()) {
143+
@inlinable public func resolve(_ proposal: Proposal, with cache: inout Void) throws -> Commit<Value> {
144+
try reduce(with: proposal.lazy.merged().nonvirtuals(), into: Commit()) {
147145
commit, virtuals, nonvirtual in
148146
commit.snapshot.append(contentsOf: virtuals, as: .phantom)
149147
commit.snapshot.append(nonvirtual)
@@ -165,12 +163,12 @@ extension PatternTextStyle {
165163
//=----------------------------------=
166164
if !mismatches.isEmpty {
167165
//=------------------------------=
168-
// Value <= Capacity
166+
// Content <= Capacity
169167
//=------------------------------=
170168
if !virtuals.isEmpty {
171169
throw Info([.mark(mismatches.first!), "is invalid."])
172170
//=------------------------------=
173-
// Value >> Capacity
171+
// Content > Capacity
174172
//=------------------------------=
175173
} else {
176174
let capacity = Info.note(commit.value.count)

0 commit comments

Comments
 (0)