From a6453eccb8d26724249d6f40f9b391523a8bc434 Mon Sep 17 00:00:00 2001 From: steve donovan Date: Tue, 17 Apr 2018 19:58:48 +0200 Subject: [PATCH] issue #65 convert -> collect --- src/5-stdlib-containers.md | 4 ++-- src/readme.md | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/5-stdlib-containers.md b/src/5-stdlib-containers.md index 85d1acb..cf81581 100644 --- a/src/5-stdlib-containers.md +++ b/src/5-stdlib-containers.md @@ -111,7 +111,7 @@ either is a vector or an error: ``` And if there was a bad conversion? Then you would just get `Err` with the first -error encountered. It's a good example of how extremely flexible `convert` is. +error encountered. It's a good example of how extremely flexible `collect` is. (The notation here can be intimidating - `Vec<_>` means "this is a vector, work out the actual type for me` and `Result,_>` is furthermore asking Rust to work out the error type as well.) @@ -449,7 +449,7 @@ vector to have the _boxed trait type_ before things just work: ```rust let mut v: Vecf64>> = Vec::new(); ``` -We can now use the same trick and keep these boxed closures in a `HashMap`. We still +We can now use the same trick and keep these boxed closures in a `HashMap`. We still have to watch out for lifetimes, since closures can borrow from their environment. It's tempting as first to make them `FnMut` - that is, they can modify any captured variables. But we will diff --git a/src/readme.md b/src/readme.md index 87660ed..8662b64 100644 --- a/src/readme.md +++ b/src/readme.md @@ -1,6 +1,7 @@ # A Gentle Introduction To Rust ![Rust](PPrustS.png) + [thanks to David Marino](http://leftoversalad.com/c/015_programmingpeople/) ## Why learn a new Programming Language? @@ -107,5 +108,5 @@ I'd like to thank the many contributors who caught bad English or bad Rust for m and thanks to David Marino for his cool characterization of Rust as a friendly-but-hardcore no-nonsense knight in shining armour. -Steve Donovan © 2017 MIT license version 0.3.0 +Steve Donovan © 2017-2018 MIT license version 0.4.0