Skip to content

Commit

Permalink
[BOT] Updating 3243bea content
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 7, 2024
1 parent 3243bea commit c3d5b80
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rustbook-en/src/conversion/from_into.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let my_str = "hello";
let my_string = String::from(my_str);
```

We can do similar for defining a conversion for our own type.
We can do something similar for defining a conversion for our own type.

```rust,editable
use std::convert::From;
Expand Down
6 changes: 1 addition & 5 deletions rustbook-en/src/flow_control/if_let.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ For some use cases, when matching enums, `match` is awkward. For example:
let optional = Some(7);

match optional {
Some(i) => {
println!("This is a really long string and `{:?}`", i);
// ^ Needed 2 indentations just so we could destructure
// `i` from the option.
},
Some(i) => println!("This is a really long string and `{:?}`", i),
_ => {},
// ^ Required because `match` is exhaustive. Doesn't it seem
// like wasted space?
Expand Down
8 changes: 4 additions & 4 deletions rustbook-en/src/fn/diverging.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ fn main() {
}
```

Although this might seem like an abstract concept, it is in fact very useful and
often handy. The main advantage of this type is that it can be cast to any other
one and therefore used at places where an exact type is required, for instance
in `match` branches. This allows us to write code like this:
Although this might seem like an abstract concept, it is actually very useful and
often handy. The main advantage of this type is that it can be cast to any other
type, making it versatile in situations where an exact type is required, such as
in match branches. This flexibility allows us to write code like this:

```rust
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion rustbook-en/src/hello/print.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Formatted print

Printing is handled by a series of [`macros`][macros] defined in
[`std::fmt`][fmt] some of which include:
[`std::fmt`][fmt] some of which are:

* `format!`: write formatted text to [`String`][string]
* `print!`: same as `format!` but the text is printed to the console
Expand Down

0 comments on commit c3d5b80

Please sign in to comment.