From: Ralf Jung Date: Fri, 16 Sep 2016 06:53:25 +0000 (+0200) Subject: Merge pull request #20 from avkrotov/reference X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/a910b7951064783570a2a759340ca8951d20a9a1?hp=940a573f598530dda50c88dabf84e73ff7c73dc5 Merge pull request #20 from avkrotov/reference "*a reference* the vector" -> "*a reference* to the vector" --- diff --git a/src/part04.rs b/src/part04.rs index cb101fe..83eb87d 100644 --- a/src/part04.rs +++ b/src/part04.rs @@ -49,7 +49,7 @@ fn ownership_demo() { //@ vector. Hence, when `vec_min` finishes, the entire vector is deleted. That's of course not what //@ we wanted! Can't we somehow give `vec_min` access to the vector, while retaining ownership of it? //@ -//@ Rust calls this *a reference* the vector, and it considers references as *borrowing* ownership. This +//@ Rust calls this *a reference* to the vector, and it considers references as *borrowing* ownership. This //@ works a bit like borrowing does in the real world: If your friend borrows a book from you, your friend //@ can have it and work on it (and you can't!) as long as the book is still borrowed. Your friend could //@ even lend the book to someone else. Eventually however, your friend has to give the book back to you,