From f7712473aa024cabb96855e68f3d1fa0f5a419c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Mon, 29 Oct 2018 12:27:39 +0100 Subject: [PATCH] Move Sequence.allSatisfy where it is used: tests --- GRDB/Utils/Utils.swift | 8 -------- Tests/GRDBTests/GRDBTestCase.swift | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/GRDB/Utils/Utils.swift b/GRDB/Utils/Utils.swift index fb497951d..fa808dca4 100644 --- a/GRDB/Utils/Utils.swift +++ b/GRDB/Utils/Utils.swift @@ -69,11 +69,3 @@ extension Array { } } } - -#if !swift(>=4.2) -extension Sequence { - func allSatisfy(_ predicate: (Self.Element) throws -> Bool) rethrows -> Bool { - return try !contains(where: { try !predicate($0) }) - } -} -#endif diff --git a/Tests/GRDBTests/GRDBTestCase.swift b/Tests/GRDBTests/GRDBTestCase.swift index 9989a9882..60fa4f0ff 100644 --- a/Tests/GRDBTests/GRDBTestCase.swift +++ b/Tests/GRDBTests/GRDBTestCase.swift @@ -166,3 +166,11 @@ class GRDBTestCase: XCTestCase { } } } + +#if !swift(>=4.2) +extension Sequence { + func allSatisfy(_ predicate: (Self.Element) throws -> Bool) rethrows -> Bool { + return try !contains(where: { try !predicate($0) }) + } +} +#endif