Skip to content

Commit 7c4c7bc

Browse files
committed
Deprecate DispatchQueue asyncAfter extension
1 parent fce1f06 commit 7c4c7bc

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Thanks to [pnewell](https://github.com/pnewell), SwiftUIKit now supports Catalys
1111
### 🗑️ Deprecations
1212

1313
* The `DateFormatter` init extensions have been deprecated.
14+
* The `DispatchQueue` `asyncAfter` extension has been deprecated.
1415
* The `JsonEncoder/Decoder` date extensions have been deprecated.
1516

1617

Sources/SwiftUIKit/Extensions/Comparable+Limit.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ public extension Comparable {
1717

1818
/// Return the value limited to a closed range.
1919
func limited(to range: ClosedRange<Self>) -> Self {
20-
if self < range.lowerBound { return range.lowerBound }
21-
if self > range.upperBound { return range.upperBound }
22-
return self
20+
min(range.upperBound, max(range.lowerBound, self))
2321
}
2422
}

Sources/SwiftUIKit/Extensions/DispatchQueue+Async.swift renamed to Sources/SwiftUIKit/_Deprecated/DispatchQueue+Async.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import Foundation
1212

13+
@available(*, deprecated, message: "This is no longer used within the library and will be removed in the next major release.")
1314
public extension DispatchQueue {
1415

1516
/// Perform an operation after a certain time interval.

0 commit comments

Comments
 (0)