Commit Graph
14 Commits
Author SHA1 Message Date
Alejandro Alonso 06423d7329 Fix broken docs 2026-06-17 13:48:54 -07:00
Alejandro AlonsoandKaroy Lorentey eb5c24f71a Update Sources/BasicContainers/RigidArray/RigidArray.swift
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2026-06-17 13:48:54 -07:00
Alejandro Alonso 6da58357a3 Rename reallocate to setCapacity for Rigid and UniqueArray
Update UniqueArray.swift

Update UniqueArray.swift
2026-06-17 13:48:53 -07:00
Manoj Mahapatra 6cce7de52e fix: reserveCapacity DocC link in RigidArray 2026-04-29 12:41:08 -07:00
Karoy Lorentey 1c69635852 Add SPDX-License-Identifier tags 2026-03-05 19:39:24 -08:00
Nate Cook 54ca53612f Include notes about index mutation in span(after/before:)
The indexes passed to span(after:) and friends on UniqueArray
and RigidArray are modified before return. This adds notes
about the updated values to the method documentation, along
with a few other minor formatting changes (dropping smart
quotes, single-sentence abstracts).
2026-03-02 16:38:48 -08:00
Karoy Lorentey b9fd3ed56e RigidArray, UniqueArray: Move remaining deprecations to dedicated file 2026-02-05 16:46:14 -08:00
Karoy Lorentey 06f2ec073d Rigid, Unique types: Rework OutputSpan-based append/prepend/insert/replaceSubrange primitives 2026-02-04 17:29:43 -08:00
Karoy Lorentey 9503f8fe57 Improve consistency of precondition failure messages
More uniform message strings should feel better, and they should ever so slightly reduce code size.
2026-02-04 10:27:17 -08:00
Karoy Lorentey b768d22393 [BasicContainers] RigidArray, UniqueArray: “precisely once” → “at most once”
Loosen guarantees about how many times closure arguments are getting called, so that e.g. insertions of zero items do not necessarily need to call their callback with an empty OutputSpan.

(For these array types we can reinstate the guarantee later, if it turns out to be important/useful. However, the generalized primitives will need to allow their callbacks to get called an arbitrary number of times, and it seems useful to establish that (at least partially) with these simple array types too.)
2026-02-04 10:09:00 -08:00
Karoy Lorentey 99da8a72e0 [BasicContainers] RigidArray, UniqueArray: Add formIndex(before:) 2026-02-03 15:10:11 -08:00
Karoy Lorentey 1e310e2908 [BasicContainers] RigidArray, UniqueArray: Rename copy() → clone() 2026-02-03 13:20:48 -08:00
Karoy Lorentey 3d4423f33e [BasicContainers] RigidArray, UniqueArray: Gather all public initializers into the same source file 2026-02-03 13:20:09 -08:00
Karoy Lorentey 0c376aceb6 [BasicContainers] Move array implementations into subdirectories
(This sets the stage for more data structures in BasicContainers)
2026-02-03 13:05:03 -08:00