Skip to content

Commit

Permalink
Merge pull request Quick#443 from Quick/redundant-conformance-warnings
Browse files Browse the repository at this point in the history
[gardening] Address redundant conformance warnings in Swift 4
  • Loading branch information
jeffh authored Jun 27, 2017
2 parents 3351d8e + 08acd4c commit e3e4726
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/Nimble/Matchers/Equal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public func equal<T: Equatable>(_ expectedValue: T?) -> Predicate<T> {
/// Values can support equal by supporting the Equatable protocol.
///
/// @see beCloseTo if you want to match imprecise types (eg - floats, doubles).
public func equal<T: Equatable, C: Equatable>(_ expectedValue: [T: C]?) -> Predicate<[T: C]> {
public func equal<T, C: Equatable>(_ expectedValue: [T: C]?) -> Predicate<[T: C]> {
return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in
let actualValue = try actualExpression.evaluate()
if expectedValue == nil || actualValue == nil {
Expand Down Expand Up @@ -201,11 +201,11 @@ public func !=<T: Comparable>(lhs: Expectation<Set<T>>, rhs: Set<T>?) {
lhs.toNot(equal(rhs))
}

public func ==<T: Equatable, C: Equatable>(lhs: Expectation<[T: C]>, rhs: [T: C]?) {
public func ==<T, C: Equatable>(lhs: Expectation<[T: C]>, rhs: [T: C]?) {
lhs.to(equal(rhs))
}

public func !=<T: Equatable, C: Equatable>(lhs: Expectation<[T: C]>, rhs: [T: C]?) {
public func !=<T, C: Equatable>(lhs: Expectation<[T: C]>, rhs: [T: C]?) {
lhs.toNot(equal(rhs))
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/NimbleTests/Helpers/XCTestCaseProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public protocol XCTestCaseNameProvider {

public protocol XCTestCaseProvider: XCTestCaseProviderStatic, XCTestCaseNameProvider {}

extension XCTestCaseProvider where Self: XCTestCaseProviderStatic {
extension XCTestCaseProvider {
var allTestNames: [String] {
return type(of: self).allTests.map({ name, _ in
return name
Expand Down

0 comments on commit e3e4726

Please sign in to comment.