Fixing steve nits

This commit is contained in:
Carol (Nichols || Goulding)
2017-01-23 15:29:49 -05:00
parent 2145cc2e52
commit 40dfd1eb11
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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,