Fix typos in documentation and comments

Corrects 25 misspellings across DocC articles, design documentation and doc
comments. Prose only: no identifiers, no public API, no behaviour change.

| Typo | Correction | Count |
|---|---|---|
| `offseting` | `offsetting` | 7 |
| `valud` | `value` | 4 |
| `necessarilly` | `necessarily` | 3 |
| `recommmend` | `recommend` | 2 |
| `Mutablility` | `Mutability` | 1 |
| `childs` | `child's` | 1 |
| `constaints` | `constraints` | 1 |
| `destintion` | `destination` | 1 |
| `explan` | `explain` | 1 |
| `forcuses` | `focuses` | 1 |
| `ot` | `or` | 1 |
| `succcess` | `success` | 1 |
| `unqiue` | `unique` | 1 |

Two of these are worth a second look, since they are not pure spelling:

- `_HTable+Removal.swift:18` reads "without marking it as unoccupied ot
  restoring the hash table's other invariants". Read as `or`, matching the
  sentence, and deliberately not as a prefix of `other` later on the line.
- `_Node.UnsafeHandle+Deletion.swift:369` reads "reuse the left childs node".
  Corrected to the possessive `child's` rather than `children`, which is what
  a plain spellchecker suggests but does not fit the sentence.

`valud` is corrected to `value` to match the wording of the equivalent
parameter documentation on `swapAt(_:_:)`.

One change is outside documentation: `CheckContainer.swift:476` fixes
`succcess` inside a test assertion message. It is a human-readable string, not
an expected value, so no test behaviour changes.

Deliberately left alone:

- `isDisjoint(with:)-54iy6` in `OrderedSet.md` is a DocC disambiguation hash,
  not a misspelling.
- `Peristent` in the 2022 ShareableHashedCollections review document, which is
  an archived record of a past review rather than living documentation.

Found with `typos-cli`, then reviewed by hand; the tool's raw output also
flagged identifiers and symbol hashes, which are not included here.
This commit is contained in:
Elior Pommier committed 2026-09-18 14:31:47 +02:00
1 parent 3ceaf1ac39
commit cabf7390ce
15 files changed
+25 -25

No files matched your search

@@ -115,7 +115,7 @@ extension UniqueArray where Element: ~Copyable {
/// endIndex. Passing the same index as both `i` and `j` has no effect.
///
/// - Parameter i: The index of the first value to swap.
/// - Parameter j: The index of the second valud to swap.
/// - Parameter j: The index of the second value to swap.
///
/// - Complexity: O(1)
@inlinable
@@ -191,7 +191,7 @@ extension UniqueArray where Element: ~Copyable {
/// array.
///
/// - Note: To improve performance, this method does not validate that the
/// given index is valid before offseting it. Index validation is
/// given index is valid before offsetting it. Index validation is
/// deferred until the resulting index is used to access an element.
/// This optimization may be removed in future versions; do not rely on it.
///
@@ -211,7 +211,7 @@ extension UniqueArray where Element: ~Copyable {
/// Returns the distance between two indices.
///
/// - Note: To improve performance, this method does not validate that the
/// given index is valid before offseting it. Index validation is
/// given index is valid before offsetting it. Index validation is
/// deferred until the resulting index is used to access an element.
/// This optimization may be removed in future versions; do not rely on it.
///
@@ -242,7 +242,7 @@ extension UniqueArray where Element: ~Copyable {
/// those bounds.
///
/// - Note: To improve performance, this method does not validate that the
/// given index is valid before offseting it. Index validation is
/// given index is valid before offsetting it. Index validation is
/// deferred until the resulting index is used to access an element.
/// This optimization may be removed in future versions; do not rely on it.
///