Fixed typo.
authorTorsten Scheck <torsten.scheck@gmx.de>
Wed, 28 Jun 2017 05:51:02 +0000 (07:51 +0200)
committerTorsten Scheck <torsten.scheck@gmx.de>
Wed, 28 Jun 2017 05:51:02 +0000 (07:51 +0200)
src/part10.rs

index 66d18ff1fc63e23f68f609ff0234f98824807686..0c90369c47145464411d557acc2f44fcb74d6788 100644 (file)
@@ -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*
 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.
     //@ 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.