Skip to content

Commit

Permalink
fix: shadow parameter warning and add concurrency check to CI (#116)
Browse files Browse the repository at this point in the history
Closes #115.
  • Loading branch information
cgrindel committed Oct 13, 2023
1 parent 9ca2a36 commit 848730e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
# Every day at 11:17 UTC.
- cron: '17 11 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
macos_build:
runs-on: macos-13
Expand Down
8 changes: 4 additions & 4 deletions Sources/Truth/TypeAssertions.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
public extension Subject {
/// Asserts that a subject is the specified type.
@discardableResult func isA<T>(
_ expectedType: T.Type,
@discardableResult func isA<ET>(
_ expectedType: ET.Type,
file: StaticString = #file,
line: UInt = #line,
_ subjectConsumer: (Subject<T>) throws -> Void = { _ in }
_ subjectConsumer: (Subject<ET>) throws -> Void = { _ in }
) -> Self {
guard continueAssertions else {
return self
}
guard let expected = actual as? T else {
guard let expected = actual as? ET else {
fail(
file: file,
line: line,
Expand Down

0 comments on commit 848730e

Please sign in to comment.