Skip to content

Commit fc17a8a

Browse files
Trailing spaces
1 parent e386be5 commit fc17a8a

39 files changed

+84
-84
lines changed

src/crates/using_lib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn main() {
2020
```txt
2121
# Where library.rlib is the path to the compiled library, assumed that it's
2222
# in the same directory here:
23-
$ rustc executable.rs --extern rary=library.rlib && ./executable
23+
$ rustc executable.rs --extern rary=library.rlib && ./executable
2424
called rary's `public_function()`
2525
called rary's `indirect_access()`, that
2626
> called rary's `private_function()`

src/custom_types/enum/testcase_linked_list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl List {
3333
// `self` has type `&List`, and `*self` has type `List`, matching on a
3434
// concrete type `T` is preferred over a match on a reference `&T`
3535
// after Rust 2018 you can use self here and tail (with no ref) below as well,
36-
// rust will infer &s and ref tail.
36+
// rust will infer &s and ref tail.
3737
// See https://doc.rust-lang.org/edition-guide/rust-2018/ownership-and-lifetimes/default-match-bindings.html
3838
match *self {
3939
// Can't take ownership of the tail, because `self` is borrowed;

src/error/abort_unwind.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The previous section illustrates the error handling mechanism `panic`. Different code paths can be conditionally compiled based on the panic setting. The current values available are `unwind` and `abort`.
44

5-
Building on the prior lemonade example, we explicitly use the panic strategy to exercise different lines of code.
5+
Building on the prior lemonade example, we explicitly use the panic strategy to exercise different lines of code.
66

77
```rust,editable,mdbook-runnable
88
fn drink(beverage: &str) {

src/error/option_unwrap/and_then.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ known in some languages as flatmap, comes in.
99
`and_then()` calls its function input with the wrapped value and returns the result. If the `Option` is `None`, then it returns `None` instead.
1010

1111
In the following example, `cookable_v3()` results in an `Option<Food>`.
12-
Using `map()` instead of `and_then()` would have given an
12+
Using `map()` instead of `and_then()` would have given an
1313
`Option<Option<Food>>`, which is an invalid type for `eat()`.
1414

1515
```rust,editable

src/error/option_unwrap/defaults.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ There is more than one way to unpack an `Option` and fall back on a default if i
1010
`or()`is chainable and eagerly evaluates its argument, as is shown in the following example. Note that because `or`'s arguments are evaluated eagerly, the variable passed to `or` is moved.
1111

1212
```rust,editable
13-
#[derive(Debug)]
13+
#[derive(Debug)]
1414
enum Fruit { Apple, Orange, Banana, Kiwi, Lemon }
1515
1616
fn main() {
@@ -35,7 +35,7 @@ fn main() {
3535
Another alternative is to use `or_else`, which is also chainable, and evaluates lazily, as is shown in the following example:
3636

3737
```rust,editable
38-
#[derive(Debug)]
38+
#[derive(Debug)]
3939
enum Fruit { Apple, Orange, Banana, Kiwi, Lemon }
4040
4141
fn main() {
@@ -84,7 +84,7 @@ fn main() {
8484
Instead of explicitly providing a value to fall back on, we can pass a closure to `get_or_insert_with`, as follows:
8585

8686
```rust,editable
87-
#[derive(Debug)]
87+
#[derive(Debug)]
8888
enum Fruit { Apple, Orange, Banana, Kiwi, Lemon }
8989
9090
fn main() {

src/error/result/enter_question_mark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ at older code. The same `multiply` function from the previous example
4444
would look like this using `try!`:
4545

4646
```rust,editable,edition2015
47-
// To compile and run this example without errors, while using Cargo, change the value
47+
// To compile and run this example without errors, while using Cargo, change the value
4848
// of the `edition` field, in the `[package]` section of the `Cargo.toml` file, to "2015".
4949
5050
use std::num::ParseIntError;

src/flow_control/for.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn main() {
7171
_ => println!("Hello {}", name),
7272
}
7373
}
74-
74+
7575
println!("names: {:?}", names);
7676
}
7777
```
@@ -90,7 +90,7 @@ fn main() {
9090
_ => println!("Hello {}", name),
9191
}
9292
}
93-
93+
9494
println!("names: {:?}", names);
9595
// FIXME ^ Comment out this line
9696
}

src/flow_control/if_let.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,18 @@ fn main() {
7070
let a = Foo::Bar;
7171
let b = Foo::Baz;
7272
let c = Foo::Qux(100);
73-
73+
7474
// Variable a matches Foo::Bar
7575
if let Foo::Bar = a {
7676
println!("a is foobar");
7777
}
78-
78+
7979
// Variable b does not match Foo::Bar
8080
// So this will print nothing
8181
if let Foo::Bar = b {
8282
println!("b is foobar");
8383
}
84-
84+
8585
// Variable c matches Foo::Qux which has a value
8686
// Similar to Some() in the previous example
8787
if let Foo::Qux(value) = c {

src/flow_control/let_else.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ patterns with an unfortunate bit of repetition and an outer `let`:
3434

3535
```rust
3636
# use std::str::FromStr;
37-
#
37+
#
3838
# fn get_count_item(s: &str) -> (u64, &str) {
3939
# let mut it = s.split(' ');
4040
let (count_str, item) = match (it.next(), it.next()) {
@@ -48,7 +48,7 @@ patterns with an unfortunate bit of repetition and an outer `let`:
4848
};
4949
# (count, item)
5050
# }
51-
#
51+
#
5252
# assert_eq!(get_count_item("3 chairs"), (3, "chairs"));
5353
```
5454

src/flow_control/while_let.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Using `while let` makes this sequence much nicer:
3434
fn main() {
3535
// Make `optional` of type `Option<i32>`
3636
let mut optional = Some(0);
37-
37+
3838
// This reads: "while `let` destructures `optional` into
3939
// `Some(i)`, evaluate the block (`{}`). Else `break`.
4040
while let Some(i) = optional {

0 commit comments

Comments
 (0)