Skip to content

Commit 8d43a4e

Browse files
authored
Fix typos in comments and private code naming (#483)
1 parent 7436264 commit 8d43a4e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

Sources/TSCBasic/Closable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
/// Closable entity is one that manages underlying resources and needs to be closed for cleanup
12-
/// The intent of this method is for the sole owner of the refernece/handle of the resource to close it completely, comapred to releasing a shared resource.
12+
/// The intent of this method is for the sole owner of the reference/handle of the resource to close it completely, compared to releasing a shared resource.
1313
public protocol Closable {
1414
func close() throws
1515
}

Sources/TSCBasic/CollectionExtensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension Collection {
2727
extension Collection where Element: Hashable {
2828
/// Returns a new list of element removing duplicate elements.
2929
///
30-
/// Note: The order of elements is preseved.
30+
/// Note: The order of elements is preserved.
3131
/// Complexity: O(n)
3232
public func spm_uniqueElements() -> [Element] {
3333
var set = Set<Element>()

Sources/TSCBasic/DeltaAlgorithm.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public struct DeltaAlgorithm<Change: Hashable>: Sendable {
6565
return result
6666
}
6767

68-
/// Minimizes a set of `changes` which has been partioned into smaller sets,
68+
/// Minimizes a set of `changes` which has been partitioned into smaller sets,
6969
/// by attempting to remove individual subsets.
7070
func delta(
7171
changes: Set<Change>,

Sources/TSCBasic/HashAlgorithms.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct InternalSHA256: HashAlgorithm {
6060
private static let blockBitSize = 512
6161

6262
/// The initial hash value.
63-
private static let initalHashValue: [UInt32] = [
63+
private static let initialHashValue: [UInt32] = [
6464
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
6565
]
6666

@@ -89,7 +89,7 @@ struct InternalSHA256: HashAlgorithm {
8989
let messageBlocks = input.blocks(size: Self.blockBitSize / 8)
9090

9191
/// The hash that is being computed.
92-
var hash = Self.initalHashValue
92+
var hash = Self.initialHashValue
9393

9494
// Process each block.
9595
for block in messageBlocks {

Sources/TSCBasic/SortedArray.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public struct SortedArray<Element>: CustomStringConvertible {
9090

9191
var lhs = elements[lhsIndex], rhs = newElements[rhsIndex]
9292

93-
// Equivalent to a merge sort, "pop" and append the max elemeent of
93+
// Equivalent to a merge sort, "pop" and append the max element of
9494
// each array until either array is empty.
9595
for index in elements.indices.reversed() {
9696
if areInIncreasingOrder(lhs, rhs) {

Sources/TSCBasic/TemporaryFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public func determineTempDirectory(_ dir: AbsolutePath? = nil) throws -> Absolut
6060
return tmpDir
6161
}
6262

63-
/// The closure argument of the `body` closue of `withTemporaryFile`.
63+
/// The closure argument of the `body` closure of `withTemporaryFile`.
6464
public struct TemporaryFile {
6565
/// If specified during init, the temporary file name begins with this prefix.
6666
let prefix: String

0 commit comments

Comments
 (0)