Skip to content

Commit d1db42f

Browse files
authored
Fix assorted typos (#1601)
1 parent 03301f8 commit d1db42f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/error/option_unwrap/defaults.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn main() {
6060

6161
## `get_or_insert()` evaluates eagerly, modifies empty value in place
6262

63-
To make sure that an `Option` contains a value, we can use `get_or_insert` to modify it in place with a fallback value, as is shown in the following example. Note that `get_or_insert` eagerly evaluaes its parameter, so variable `apple` is moved:
63+
To make sure that an `Option` contains a value, we can use `get_or_insert` to modify it in place with a fallback value, as is shown in the following example. Note that `get_or_insert` eagerly evaluates its parameter, so variable `apple` is moved:
6464

6565
```rust,editable
6666
#[derive(Debug)]
@@ -75,7 +75,7 @@ fn main() {
7575
// my_fruit is: Apple
7676
// first_available_fruit is: Apple
7777
//println!("Variable named `apple` is moved: {:?}", apple);
78-
// TODO: uncomment the line above to see the compliler error
78+
// TODO: uncomment the line above to see the compiler error
7979
}
8080
```
8181

src/flow_control/match/guard.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A `match` *guard* can be added to filter the arm.
55
```rust,editable
66
enum Temperature {
77
Celsius(i32),
8-
Farenheit(i32),
8+
Fahrenheit(i32),
99
}
1010
1111
fn main() {
@@ -17,8 +17,8 @@ fn main() {
1717
// The `if condition` part ^ is a guard
1818
Temperature::Celsius(t) => println!("{}C is below 30 Celsius", t),
1919
20-
Temperature::Farenheit(t) if t > 86 => println!("{}F is above 86 Farenheit", t),
21-
Temperature::Farenheit(t) => println!("{}F is below 86 Farenheit", t),
20+
Temperature::Fahrenheit(t) if t > 86 => println!("{}F is above 86 Fahrenheit", t),
21+
Temperature::Fahrenheit(t) => println!("{}F is below 86 Fahrenheit", t),
2222
}
2323
}
2424
```

src/std/str.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This way you can add any character to your string, even unprintable ones
6969
and ones that you don't know how to type. If you want a literal backslash,
7070
escape it with another one: `\\`
7171

72-
String or character literal delimiters occuring within a literal must be escaped: `"\""`, `'\''`.
72+
String or character literal delimiters occurring within a literal must be escaped: `"\""`, `'\''`.
7373

7474
```rust,editable
7575
fn main() {

src/unsafe/asm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ In some cases, fine control is needed over the way a register name is formatted
333333

334334
By default the compiler will always choose the name that refers to the full register size (e.g. `rax` on x86-64, `eax` on x86, etc).
335335

336-
This default can be overriden by using modifiers on the template string operands, just like you would with format strings:
336+
This default can be overridden by using modifiers on the template string operands, just like you would with format strings:
337337

338338
```rust
339339
use std::arch::asm;

0 commit comments

Comments
 (0)