Skip to content

Commit 0b111ea

Browse files
authored
Merge pull request #1280 from ngolin/master
Some fix to three files
2 parents 6f0690b + b9b785e commit 0b111ea

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/error/result.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ describes possible *error* instead of possible *absence*.
55

66
That is, `Result<T, E>` could have one of two outcomes:
77

8-
* `Ok<T>`: An element `T` was found
9-
* `Err<E>`: An error was found with element `E`
8+
* `Ok(T)`: An element `T` was found
9+
* `Err(E)`: An error was found with element `E`
1010

1111
By convention, the expected outcome is `Ok` while the unexpected outcome is `Err`.
1212

src/flow_control/match/binding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ fn main() {
1515
1616
match age() {
1717
0 => println!("I'm not born yet I guess"),
18-
// Could `match` 1 ... 12 directly but then what age
18+
// Could `match` 1 ..= 12 directly but then what age
1919
// would the child be? Instead, bind to `n` for the
20-
// sequence of 1 .. 12. Now the age can be reported.
20+
// sequence of 1 ..= 12. Now the age can be reported.
2121
n @ 1 ..= 12 => println!("I'm a child of age {:?}", n),
2222
n @ 13 ..= 19 => println!("I'm a teen of age {:?}", n),
2323
// Nothing bound. Return the result.

src/macros/dry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::ops::{Add, Mul, Sub};
1010
macro_rules! assert_equal_len {
1111
// The `tt` (token tree) designator is used for
1212
// operators and tokens.
13-
($a:ident, $b:ident, $func:ident, $op:tt) => {
13+
($a:expr, $b:expr, $func:ident, $op:tt) => {
1414
assert!($a.len() == $b.len(),
1515
"{:?}: dimension mismatch: {:?} {:?} {:?}",
1616
stringify!($func),

0 commit comments

Comments
 (0)