book icon indicating copy to clipboard operation
book copied to clipboard

ch04-01 a sentence that might need to be changed

Open EssaAlshammri opened this issue 2 years ago • 0 comments

  • [x] I have checked the latest main branch to see if this has already been fixed
  • [x] I have searched existing issues and pull requests for duplicates

URL to the section(s) of the book with this problem: https://github.com/rust-lang/book/blob/main/src/ch04-01-what-is-ownership.md

Description of the problem: Pushing to the stack is faster than allocating on the heap because the allocator never has to search for a place to store new data;

it's been explained before this that allocation is just for heap. this sentence calls pushing as allocating.

Suggested fix: Pushing to the stack is faster than allocating on the heap because it never has to search for a place to store new data;

I might be confused but I feelt that too when I read it.

EssaAlshammri avatar Oct 07 '22 14:10 EssaAlshammri