Skip to content

Commit bc47484

Browse files
committed
Update README.md
1 parent 5684e8d commit bc47484

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ copyto!(mem2, mem1)
3434

3535
# Use the memory views as ordinary vectors
3636
fst = mem1[1]
37-
reverse!(mem1) # ... etc
37+
reverse!(mem2) # ... etc
3838
```
3939

4040
### Dispatching to MemoryView
@@ -56,9 +56,7 @@ foo(x::AbstractString) = foo(codeunits(x))
5656
```
5757

5858
## API differences from `Memory`
59-
Given a `MemoryView` `v` and a `Memory` `mem`:
60-
61-
* `v[1:3]` creates a view into the same memory, instead of allocating new backing memory.
59+
* For `v::MemoryView`, `v[1:3]` creates a view into the same memory, instead of allocating new backing memory.
6260
* `copyto!` and `unsafe_copyto!` do not take starting indices. Instead, simply create new views starting at the desired indices.
6361

6462
## Limitations

0 commit comments

Comments
 (0)