Skip to content

Commit

Permalink
Merge pull request #1280 from ngolin/master
Browse files Browse the repository at this point in the history
Some fix to three files
  • Loading branch information
marioidival committed Oct 14, 2019
2 parents 6f0690b + b9b785e commit 0b111ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/error/result.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ describes possible *error* instead of possible *absence*.

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

* `Ok<T>`: An element `T` was found
* `Err<E>`: An error was found with element `E`
* `Ok(T)`: An element `T` was found
* `Err(E)`: An error was found with element `E`

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

Expand Down
4 changes: 2 additions & 2 deletions src/flow_control/match/binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ fn main() {
match age() {
0 => println!("I'm not born yet I guess"),
// Could `match` 1 ... 12 directly but then what age
// Could `match` 1 ..= 12 directly but then what age
// would the child be? Instead, bind to `n` for the
// sequence of 1 .. 12. Now the age can be reported.
// sequence of 1 ..= 12. Now the age can be reported.
n @ 1 ..= 12 => println!("I'm a child of age {:?}", n),
n @ 13 ..= 19 => println!("I'm a teen of age {:?}", n),
// Nothing bound. Return the result.
Expand Down
2 changes: 1 addition & 1 deletion src/macros/dry.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::ops::{Add, Mul, Sub};
macro_rules! assert_equal_len {
// The `tt` (token tree) designator is used for
// operators and tokens.
($a:ident, $b:ident, $func:ident, $op:tt) => {
($a:expr, $b:expr, $func:ident, $op:tt) => {
assert!($a.len() == $b.len(),
"{:?}: dimension mismatch: {:?} {:?} {:?}",
stringify!($func),
Expand Down

0 comments on commit 0b111ea

Please sign in to comment.