From 95b3f447e4dcad9d69b1d7cbf2cd6d1a6f2b0c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 12 Dec 2021 13:48:08 +0100 Subject: [PATCH] Revert "Make sure Inflections.default is lazily loaded, even in optimized release builds" This reverts commit c62ccf1de779adbe5ab210d15a4e3fb763c87df9 (aimed at fixing #755). We can do this because https://github.com/apple/swift/pull/30445 is present in the Swift 5.3 release https://github.com/apple/swift/releases/tag/swift-5.3-RELEASE --- GRDB/Utils/Inflections.swift | 8 -------- 1 file changed, 8 deletions(-) diff --git a/GRDB/Utils/Inflections.swift b/GRDB/Utils/Inflections.swift index d93d7acc7..af1f05fd3 100644 --- a/GRDB/Utils/Inflections.swift +++ b/GRDB/Utils/Inflections.swift @@ -9,22 +9,14 @@ extension String { return String(first).uppercased() + dropFirst() } - // Prevent inlining of functions that use `Inflections.default`, in order to - // make sure this global is lazily loaded, even in release builds. - // See https://github.com/groue/GRDB.swift/issues/755#issuecomment-612418053 - // TODO: remove `@inline(never)` when this PR is shipped in the compiler: - // https://github.com/apple/swift/pull/30445 - /// "player" -> "players" /// "players" -> "players" - @inline(never) var pluralized: String { Inflections.default.pluralize(self) } /// "player" -> "player" /// "players" -> "player" - @inline(never) var singularized: String { Inflections.default.singularize(self) }