Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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