Skip to content

Commit

Permalink
Shim Removal (#31)
Browse files Browse the repository at this point in the history
`Shims.swift` is no longer needed since `sleep(for:tolerance:)` is now a
[native
function](https://developer.apple.com/documentation/swift/clock/sleep(for:tolerance:)).
  • Loading branch information
Rspoon3 authored May 14, 2024
1 parent 65e74c1 commit 2c74776
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 48 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.6
// swift-tools-version: 5.7

import PackageDescription

Expand Down
2 changes: 1 addition & 1 deletion Sources/Clocks/AnyClock.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if swift(>=5.7) && (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
#if (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
/// A type-erased clock.
///
/// This type provides a concrete alternative to `any Clock<Duration>` and makes it possible to
Expand Down
2 changes: 1 addition & 1 deletion Sources/Clocks/ImmediateClock.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if swift(>=5.7) && (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
#if (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
import ConcurrencyExtras
import Foundation

Expand Down
2 changes: 1 addition & 1 deletion Sources/Clocks/Internal/_AsyncTimerSequence.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if swift(>=5.7) && (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
#if (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Async Algorithms open source project
Expand Down
17 changes: 0 additions & 17 deletions Sources/Clocks/Shims.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Sources/Clocks/SwiftUI.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if swift(>=5.7) && (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst)) && canImport(SwiftUI)
#if (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst)) && canImport(SwiftUI)
import SwiftUI

@available(macOS 13, iOS 16, watchOS 9, tvOS 16, *)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Clocks/TestClock.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if swift(>=5.7) && (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
#if (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
import ConcurrencyExtras
import Foundation
import XCTestDynamicOverlay
Expand Down
2 changes: 1 addition & 1 deletion Sources/Clocks/Timer.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if swift(>=5.7) && (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
#if (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
extension Clock where Duration: Hashable {
/// Creates an async sequence that emits the clock's `now` value on an interval.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Clocks/UnimplementedClock.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if swift(>=5.7) && (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
#if (canImport(RegexBuilder) || !os(macOS) && !targetEnvironment(macCatalyst))
import ConcurrencyExtras
import Foundation
import XCTestDynamicOverlay
Expand Down
23 changes: 0 additions & 23 deletions Tests/ClocksTests/ShimTests.swift

This file was deleted.

0 comments on commit 2c74776

Please sign in to comment.