From e2c6700d715eeb220438dde1ca7cbc110e2db5b8 Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Sun, 14 Apr 2024 06:48:38 -0400 Subject: [PATCH] Docs for processed(_:) --- Sources/RangeState/RangeProcessor.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Sources/RangeState/RangeProcessor.swift b/Sources/RangeState/RangeProcessor.swift index fb0ee95..92937c2 100644 --- a/Sources/RangeState/RangeProcessor.swift +++ b/Sources/RangeState/RangeProcessor.swift @@ -133,13 +133,16 @@ extension RangeProcessor { return processed(location) } - public func processed(_ location: Int) -> Bool { + /// Check for the processed state of a location. + /// + /// This method will not cause any processing to occur. + public func processed(_ location: Int) -> Bool { precondition(location >= 0) guard let maximumProcessedLocation else { return false } return maximumProcessedLocation >= location - } + } public func processed(_ range: NSRange) -> Bool { processed(range.location)