Skip to content

Commit

Permalink
update original
Browse files Browse the repository at this point in the history
  • Loading branch information
funkill committed Apr 18, 2024
1 parent 30679ff commit 4ce2b9f
Show file tree
Hide file tree
Showing 17 changed files with 104 additions and 102 deletions.
20 changes: 10 additions & 10 deletions rustbook-en/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use proc_macro::TokenStream;
use quote::quote;
use syn;

#[proc_macro_derive(HelloMacro)]
pub fn hello_macro_derive(input: TokenStream) -> TokenStream {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2021"
proc-macro = true

[dependencies]
syn = "1.0"
syn = "2.0"
quote = "1.0"
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use proc_macro::TokenStream;
use quote::quote;
use syn;

#[proc_macro_derive(HelloMacro)]
pub fn hello_macro_derive(input: TokenStream) -> TokenStream {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2021"
proc-macro = true

[dependencies]
syn = "1.0"
syn = "2.0"
quote = "1.0"
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use proc_macro::TokenStream;
use quote::quote;
use syn;

#[proc_macro_derive(HelloMacro)]
pub fn hello_macro_derive(input: TokenStream) -> TokenStream {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion rustbook-en/src/appendix-04-useful-development-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn main() {
The `for` loop variable is now named `_i`, and the warning no longer appears.

You can also use the `cargo fix` command to transition your code between
different Rust editions. Editions are covered in Appendix E.
different Rust editions. Editions are covered in [Appendix E][editions].

### More Lints with Clippy

Expand Down Expand Up @@ -178,3 +178,4 @@ particular IDE. Your IDE will gain abilities such as autocompletion, jump to
definition, and inline errors.

[rust-analyzer]: https://rust-analyzer.github.io
[editions]: appendix-05-editions.md
3 changes: 3 additions & 0 deletions rustbook-en/src/ch03-05-control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ and then check whether the `counter` is equal to `10`. When it is, we use the
semicolon to end the statement that assigns the value to `result`. Finally, we
print the value in `result`, which in this case is `20`.

You can also `return` from inside a loop. While `break` only exits the current
loop, `return` always exits the current function.

#### Loop Labels to Disambiguate Between Multiple Loops

If you have loops within loops, `break` and `continue` apply to the innermost
Expand Down
Loading

0 comments on commit 4ce2b9f

Please sign in to comment.