Revert "Make sure Inflections.default is lazily loaded, even in optimized release builds"

This reverts commit c62ccf1de7 (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
This commit is contained in:
Gwendal Roué committed 2021-12-12 13:57:34 +01:00
1 parent bc2a66e40f
commit 95b3f447e4
1 file changed
-8
-8
View File
@@ -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)
}