Skip to content

Commit

Permalink
Remove this bad idea
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Jan 22, 2024
1 parent 3d8d5e5 commit 77d2998
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions Sources/RangeState/HybridValueProvider+RangeProcessor.swift
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
import Foundation

extension HybridValueProvider {
/// Don't use this
@MainActor
public init(
value: Output,
rangeProcessor: RangeProcessor,
inputTransformer: @escaping (Input) -> (Int, RangeFillMode)
) {
self.init(
syncValue: { input in
let (location, fill) = inputTransformer(input)

if rangeProcessor.processLocation(location, mode: fill) {
return value
}

return nil
},
asyncValue: { input in
let (location, fill) = inputTransformer(input)

rangeProcessor.processLocation(location, mode: fill)

await rangeProcessor.processingCompleted()

return value
}
)
}

/// Construct a `HybridValueProvider` that will first attempt to process a location using a `RangeProcessor`.
@MainActor
public init(
Expand Down

0 comments on commit 77d2998

Please sign in to comment.