From: Torsten Scheck Date: Wed, 28 Jun 2017 05:51:02 +0000 (+0200) Subject: Fixed typo. X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/4b4215163da009c2ad3941cc147a3598429e40f2?hp=--cc Fixed typo. --- 4b4215163da009c2ad3941cc147a3598429e40f2 diff --git a/src/part10.rs b/src/part10.rs index 66d18ff..0c90369 100644 --- a/src/part10.rs +++ b/src/part10.rs @@ -81,7 +81,7 @@ impl BigInt { pub fn print_with_prefix(b: &BigInt, prefix: String) { //@ The syntax for closures is `|arg1, arg2, ...| code`. Notice that the closure can reference variables like `prefix` that it did not //@ take as argument - variables that happen to be present *outside* of the closure. We say that the closure *captures* - //@ variables. Rust will now automatically create a type (like `PrintWithStruct`) for the environment of the closure + //@ variables. Rust will now automatically create a type (like `PrintWithString`) for the environment of the closure //@ with fields for every captured variable, implement the closure trait for this type such that the action performed //@ is given by the code of the closure, and finally it will instantiate the environment type here at the definition site //@ of the closure and fill it appropriately.