projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5733ee9
)
"*a reference* the vector" -> "*a reference* to the vector"
author
Alexander Krotov
<ilabdsf@gmail.com>
Wed, 14 Sep 2016 20:53:58 +0000
(23:53 +0300)
committer
Alexander Krotov
<ilabdsf@gmail.com>
Wed, 14 Sep 2016 20:53:58 +0000
(23:53 +0300)
src/part04.rs
patch
|
blob
|
history
diff --git
a/src/part04.rs
b/src/part04.rs
index cb101fe10fbed065e41a4bb9e1bdb0416db4f133..83eb87dcf6604b5ee7a2f53cefa0200b85cc1769 100644
(file)
--- 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?
//@
//@ 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* t
o t
he 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,
//@ 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,