From 8a355f015f6bca86a478d86544a73ea46e943cd6 Mon Sep 17 00:00:00 2001 From: Ole Begemann Date: Mon, 27 Jun 2022 18:03:09 +0200 Subject: [PATCH] Fix a few typos (#173) --- Sources/AsyncAlgorithms/AsyncBufferedByteIterator.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/AsyncAlgorithms/AsyncBufferedByteIterator.swift b/Sources/AsyncAlgorithms/AsyncBufferedByteIterator.swift index 07063bf..848ceeb 100644 --- a/Sources/AsyncAlgorithms/AsyncBufferedByteIterator.swift +++ b/Sources/AsyncAlgorithms/AsyncBufferedByteIterator.swift @@ -31,7 +31,7 @@ /// } /// /// public func makeAsyncIterator() -> AsyncBufferedByteIterator { -/// return BufferedAsyncByteIterator(capacity: 16384) { buffer in +/// return AsyncBufferedByteIterator(capacity: 16384) { buffer in /// // This runs once every 16384 invocations of next() /// return try await handle.read(into: buffer) /// } @@ -112,7 +112,7 @@ internal struct _AsyncBytesBuffer: @unchecked Sendable { do { // If two tasks have access to this iterator then the references on // the storage will be non uniquely owned. This means that any reload - // must happen into it's own fresh buffer. The consumption of those + // must happen into its own fresh buffer. The consumption of those // bytes between two tasks are inherently defined as potential // duplication by the nature of sending that buffer across the two // tasks - this means that the brief period in which they may be @@ -122,7 +122,7 @@ internal struct _AsyncBytesBuffer: @unchecked Sendable { // should not be crash, but it definitely cannot be consistent. // // The unique ref check is here to prevent the potentials of a crashing - // secnario. + // scenario. if !isKnownUniquelyReferenced(&storage) { // The count is not mutated across invocations so the access is safe. let capacity = storage.buffer.count