mirror of
https://github.com/apple/swift-collections
synced 2026-11-26 04:47:48 +00:00
[DequeModule] RigidDeque replacements with Collections: Verify that the source’s count matches its contents
This commit is contained in:
1 file changed
+3
@@ -497,6 +497,9 @@ extension RigidDeque /* where Element: Copyable */ {
|
||||
items.formIndex(after: &i)
|
||||
}
|
||||
}
|
||||
precondition(
|
||||
i == items.endIndex,
|
||||
"Broken Collection: count doesn't match contents")
|
||||
}
|
||||
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
|
||||
Reference in new issue
Block a user