Skip to content

Commit

Permalink
Merge pull request #357 from lorentey/cherry-pick-356
Browse files Browse the repository at this point in the history
[1.1] Fix typos
  • Loading branch information
lorentey committed Feb 7, 2024
2 parents def1b63 + 7539583 commit 97b1949
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Sources/DequeModule/_UnsafeWrappedBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ extension _UnsafeMutableWrappedBuffer {
// Note: Array._copyContents traps when not given enough space, so we
// need to check if we have enough contiguous space available above.
//
// FIXME: Add suppport for segmented (a.k.a. piecewise contiguous)
// FIXME: Add support for segmented (a.k.a. piecewise contiguous)
// collections to the stdlib.
var (it, copied) = elements._copyContents(initializing: first)
if copied == first.count, let second = second {
Expand Down
2 changes: 1 addition & 1 deletion Sources/HashTreeCollections/HashNode/_UnsafePath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ extension _RawHashNode {
}
distance += c
}
// See if the target is hiding somwhere in our immediate items.
// See if the target is hiding somewhere in our immediate items.
distance &+= $0.itemCount
if distance >= 0 {
path.selectItem(at: _HashSlot(distance))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ extension TreeSet: ExpressibleByArrayLiteral {
/// Do not call this initializer directly. It is used by the compiler when
/// you use an array literal. Instead, create a new persistent set using an
/// array literal as its value by enclosing a comma-separated list of values
/// in square brackets. You can use an array literal anywhere a peristent set
/// in square brackets. You can use an array literal anywhere a persistent set
/// is expected by the type context.
///
/// Like the standard `Set`, persistent sets do not preserve the order of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension _HashTable {
/// table. This is a convenient tool for implementing linear probing.
///
/// Beyond merely providing bucket values, bucket iterators can also tell
/// you their current oposition within the hash table, and (for mutable hash
/// you their current opposition within the hash table, and (for mutable hash
/// tables) they allow you update the value of the currently visited bucket.
/// (This is useful when implementing simple insertions, for example.)
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/OrderedCollections/OrderedSet/OrderedSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ import _CollectionsUtilities
/// The hash table in an ordered set never needs to store larger indices than
/// the current size of the storage array, and `OrderedSet` makes use of this
/// observation to reduce the number of bits it uses to encode these integer
/// vaues. Additionally, the actual hashed elements are stored in a flat array
/// values. Additionally, the actual hashed elements are stored in a flat array
/// value rather than the hash table itself, so they aren't subject to the hash
/// table's strict maximum load factor. These two observations combine to
/// optimize the memory utilization of `OrderedSet`, sometimes making it even
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension BigString._Chunk: CustomStringConvertible {

func _succinctContents(maxLength c: Int) -> String {
/// 4+"short"-1
/// 0+"longer...tring"-1
/// 0+"longer...string"-1
let pc = String(prefixCount)._lpad(to: 3)
let sc = String(suffixCount)

Expand Down
2 changes: 1 addition & 1 deletion Sources/RopeModule/Rope/Basics/RopeMetric.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public protocol RopeMetric<Element>: Sendable {
///
/// - Parameter offset: An integer offset from the start of `element` in this
/// metric, not exceeding `size(of: element.summary)`.
/// - Parameter element: An arbitary rope element.
/// - Parameter element: An arbitrary rope element.
/// - Returns: The index addressing the desired position in the input element.
func index(at offset: Int, in element: Element) -> Element.Index
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/RopeModuleTests/TestBigString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ class TestBigString: CollectionTestCase {
let b1: BigString = "Foobar"
var s1 = b1.suffix(3)
expectEqual(s1, "bar")
s1.insert("\u{308}", at: s1.startIndex) // Combining diaresis
s1.insert("\u{308}", at: s1.startIndex) // Combining diaeresis
expectEqual(s1.base, "Foöbar")
expectEqual(s1, "öbar")

Expand Down

0 comments on commit 97b1949

Please sign in to comment.