From d415310e4630fa1292cd37bd117656112d5ff23c Mon Sep 17 00:00:00 2001 From: Sho Ikeda Date: Fri, 20 Apr 2018 23:34:35 +0900 Subject: [PATCH] [gardening][BeVoid] Move operators into types --- Sources/Nimble/Matchers/BeVoid.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Sources/Nimble/Matchers/BeVoid.swift b/Sources/Nimble/Matchers/BeVoid.swift index f5bf22a20..2e73eafe2 100644 --- a/Sources/Nimble/Matchers/BeVoid.swift +++ b/Sources/Nimble/Matchers/BeVoid.swift @@ -9,10 +9,12 @@ public func beVoid() -> Predicate<()> { } } -public func == (lhs: Expectation<()>, rhs: ()) { - lhs.to(beVoid()) -} +extension Expectation where T == () { + public static func == (lhs: Expectation<()>, rhs: ()) { + lhs.to(beVoid()) + } -public func != (lhs: Expectation<()>, rhs: ()) { - lhs.toNot(beVoid()) + public static func != (lhs: Expectation<()>, rhs: ()) { + lhs.toNot(beVoid()) + } }