[DequeModule] RigidDeque replacements with Collections: Verify that the source’s count matches its contents

This commit is contained in:
Karoy Lorentey committed 2026-04-27 18:01:23 -07:00
1 parent 1d5418fb68
commit 285016b285
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