mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
Rename count(where:) to countElements(where:)
This commit is contained in:
1 parent
8ef4c9b241
commit
078aa83e3b
2 files changed
+4
-2
No files matched your search
@@ -310,7 +310,9 @@ extension Array where Element == TableAlias {
|
||||
for (lowercaseName, group) in groups {
|
||||
if group.count > 1 {
|
||||
// It is a programmer error to reuse the same alias for multiple tables
|
||||
GRDBPrecondition(group.count(where: \.hasUserName) < 2, "ambiguous alias: \(group[0].identityName)")
|
||||
GRDBPrecondition(
|
||||
group.countElements(where: \.hasUserName) < 2,
|
||||
"ambiguous alias: \(group[0].identityName)")
|
||||
ambiguousGroups.append(group)
|
||||
} else {
|
||||
uniqueLowercaseNames.insert(lowercaseName)
|
||||
|
||||
@@ -95,7 +95,7 @@ extension DispatchQueue {
|
||||
|
||||
extension Sequence {
|
||||
@inlinable
|
||||
func count(where predicate: (Element) throws -> Bool) rethrows -> Int {
|
||||
func countElements(where predicate: (Element) throws -> Bool) rethrows -> Int {
|
||||
var count = 0
|
||||
for e in self where try predicate(e) {
|
||||
count += 1
|
||||
|
||||
Reference in new issue
Block a user