From: Ralf Jung Date: Fri, 16 Sep 2016 06:53:44 +0000 (+0200) Subject: Merge pull request #21 from avkrotov/implemenets X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/0c5e5d86510258f57cf2c1f23479b675e14c50d3?hp=61b95423bc993e91dc64dd022321041fca3af9cc Merge pull request #21 from avkrotov/implemenets s/implemenets/implements/ --- diff --git a/TODO.txt b/TODO.txt index ed3434c..0e31a4a 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,3 +1,3 @@ -* Shared-memoty concurrency, interior mutability, Sync: Concurrent counter +* Shared-memory concurrency, interior mutability, Sync: Concurrent counter * Drop, unsafe: doubly-linked list 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,