From 40dfd1eb1174fbaf9382e4be4e5151d3b0ea1e94 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Mon, 23 Jan 2017 14:34:53 -0500 Subject: [PATCH] Fixing steve nits --- src/ch13-00-functional-features.md | 2 +- src/ch13-01-closures.md | 4 ++-- src/ch13-03-improving-our-io-project.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ch13-00-functional-features.md b/src/ch13-00-functional-features.md index c1e8f2c62..55cce6770 100644 --- a/src/ch13-00-functional-features.md +++ b/src/ch13-00-functional-features.md @@ -3,7 +3,7 @@ Rust's design has taken inspiration from a lot of previous work. One of Rust's influences is functional programming, where functions are values that can be used as arguments or return values to other functions, assigned to variables, -and so forth. We're going to sidestep the issue of what, exactly, function +and so forth. We're going to sidestep the issue of what, exactly, functional programming is or is not, and instead show off some features of Rust that are similar to features in many languages referred to as functional. diff --git a/src/ch13-01-closures.md b/src/ch13-01-closures.md index ff1260ab1..2f2b7f938 100644 --- a/src/ch13-01-closures.md +++ b/src/ch13-01-closures.md @@ -95,8 +95,8 @@ relevant parts: ```rust fn add_one_v1 (x: i32) -> i32 { x + 1 } // a function let add_one_v2 = |x: i32| -> i32 { x + 1 }; // the full syntax for a closure -let add_one_v3 = |x: i32| { x + 1 }; // a closure eliding types -let add_one_v4 = |x: i32| x + 1 ; // without braces +let add_one_v3 = |x| { x + 1 }; // a closure eliding types +let add_one_v4 = |x| x + 1 ; // without braces ``` The reason type annotations are not required for defining a closure but are diff --git a/src/ch13-03-improving-our-io-project.md b/src/ch13-03-improving-our-io-project.md index cdedaac2c..57e085b1f 100644 --- a/src/ch13-03-improving-our-io-project.md +++ b/src/ch13-03-improving-our-io-project.md @@ -89,12 +89,12 @@ impl Config { let search = match args.next() { Some(arg) => arg, None => return Err("Didn't get a search string"), - }; + }; let filename = match args.next() { Some(arg) => arg, None => return Err("Didn't get a file name"), - }; + }; Ok(Config { search: search,