mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
Make sure Inflections.default is lazily loaded, even in optimized release builds
This commit addresses #755
This commit is contained in:
1 parent
ed15498871
commit
c62ccf1de7
1 file changed
+6
@@ -9,14 +9,20 @@ extension String {
|
||||
return String(first).uppercased() + dropFirst()
|
||||
}
|
||||
|
||||
// Never inline this property, in order to make sure Inflections.default
|
||||
// is lazily loaded. See https://github.com/groue/GRDB.swift/issues/755#issuecomment-612418053
|
||||
/// "player" -> "players"
|
||||
/// "players" -> "players"
|
||||
@inline(never)
|
||||
var pluralized: String {
|
||||
return Inflections.default.pluralize(self)
|
||||
}
|
||||
|
||||
// Never inline this property, in order to make sure Inflections.default
|
||||
// is lazily loaded. See https://github.com/groue/GRDB.swift/issues/755#issuecomment-612418053
|
||||
/// "player" -> "player"
|
||||
/// "players" -> "player"
|
||||
@inline(never)
|
||||
var singularized: String {
|
||||
return Inflections.default.singularize(self)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user