Skip to content

Commit a6b7091

Browse files
committed
auto merge of #18748 : carols10cents/rust/prepend-to-append, r=alexcrichton
A most trivial documentation correction. The examples in the intro are all about adding to the end of the array, not the beginning, but this one line says "prepend". This isn't a very serious problem, it just made me a bit confused when I got to it.
2 parents 16d80de + fc47dd9 commit a6b7091

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ including the right thing!) Even though we compiled with flags to give us as
217217
many warnings as possible, and to treat those warnings as errors, we got no
218218
errors. When we ran the program, it crashed.
219219

220-
Why does this happen? When we prepend to an array, its length changes. Since
220+
Why does this happen? When we append to an array, its length changes. Since
221221
its length changes, we may need to allocate more memory. In Ruby, this happens
222222
as well, we just don't think about it very often. So why does the C++ version
223223
segfault when we allocate more memory?

0 commit comments

Comments
 (0)