Skip to content

Commit 5340db1

Browse files
committed
editorial fixes
1 parent 0344e4f commit 5340db1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proposals/nnnn-MutableSpan.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Mutability requires exclusive access, per Swift's [law of exclusivity][SE-0176].
3737

3838
#### MutableSpan
3939

40-
`MutableSpan` allows delegating mutations of a type's contiguous internal representation, by providing access to an exclusively-borrowed view of a range of contiguous, initialized memory. `MutableSpan`'s memory safety' relies on guarantees that:
40+
`MutableSpan` allows delegating mutations of a type's contiguous internal representation, by providing access to an exclusively-borrowed view of a range of contiguous, initialized memory. `MutableSpan`'s memory safety relies on guarantees that:
4141
- it has exclusive access to the range of memory it represents, providing data race safety and enforced by `~Copyable`.
4242
- the memory it represents will remain valid for the duration of the access, providing lifetime safety and enforced by `~Escapable`.
4343
- each access is guarded by bounds checking, providing bounds safety.
@@ -90,7 +90,7 @@ extension MutableSpan where Element: ~Copyable & ~Escapable {
9090
}
9191
```
9292

93-
This function returns an instance of `MutableSpan` that represents a mutation of the same memory as represented by the callee. The callee can therefore no longer be mutated while the returned value exists:
93+
This function returns an instance of `MutableSpan` that represents a mutation of the same memory as represented by the callee. The callee can therefore no longer be accessed (read or mutated) while the returned value exists:
9494

9595
```swift
9696
var array = [1, 2, 3, 4, 5]
@@ -713,7 +713,7 @@ The `mutating` functions in this proposal generally do not represent mutations o
713713

714714
#### Harmonizing `extracting()` functions across types
715715

716-
The range of `extracting()` functions proposed here expands upon the range accepted in [SE-0437][SE-0437]. If the prefix and suffix variants are accepted, we should add them to `UnsafeBufferPointer` types as well. `Span` and `RawSpan` should also have `extracting()` functions with appropriate lifetime dependencies.
716+
The range of `extracting()` functions proposed here expands upon the range accepted in [SE-0437][SE-0437]. If the prefix and suffix variants are accepted, we should add them to `UnsafeBufferPointer` types as well. `Span` and `RawSpan` should also have `extracting()` functions with appropriate lifetime dependencies.
717717

718718
#### <a name="OutputSpan"></a>Delegated initialization with `OutputSpan<T>`
719719

0 commit comments

Comments
 (0)