-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0ea9a9
commit 5cd2ec1
Showing
100 changed files
with
4,148 additions
and
13,658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 71 additions & 6 deletions
77
rustbook-en/listings/ch02-guessing-game-tutorial/listing-02-02/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
rustbook-en/listings/ch02-guessing-game-tutorial/no-listing-01-cargo-new/Cargo.lock
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
rustbook-en/listings/ch02-guessing-game-tutorial/no-listing-01-cargo-new/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
$ cargo run | ||
Compiling guessing_game v0.1.0 (file:///projects/guessing_game) | ||
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.50s | ||
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.20s | ||
Running `target/debug/guessing_game` | ||
Hello, world! |
31 changes: 17 additions & 14 deletions
31
...en/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
$ cargo run | ||
Compiling enums v0.1.0 (file:///projects/enums) | ||
error[E0004]: non-exhaustive patterns: `None` not covered | ||
--> src/main.rs:3:15 | ||
| | ||
3 | match x { | ||
| ^ pattern `None` not covered | ||
| | ||
--> src/main.rs:3:15 | ||
| | ||
3 | match x { | ||
| ^ pattern `None` not covered | ||
| | ||
note: `Option<i32>` defined here | ||
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:574:1 | ||
::: /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c/library/core/src/option.rs:578:5 | ||
| | ||
= note: not covered | ||
= note: the matched value is of type `Option<i32>` | ||
--> file:///home/.rustup/toolchains/1.82/lib/rustlib/src/rust/library/core/src/option.rs:571:1 | ||
| | ||
571 | pub enum Option<T> { | ||
| ^^^^^^^^^^^^^^^^^^ | ||
... | ||
575 | None, | ||
| ---- not covered | ||
= note: the matched value is of type `Option<i32>` | ||
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | ||
| | ||
4 ~ Some(i) => Some(i + 1), | ||
5 ~ None => todo!(), | ||
| | ||
| | ||
4 ~ Some(i) => Some(i + 1), | ||
5 ~ None => todo!(), | ||
| | ||
|
||
For more information about this error, try `rustc --explain E0004`. | ||
error: could not compile `enums` (bin "enums") due to 1 previous error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
rustbook-en/listings/ch11-writing-automated-tests/listing-11-01/Cargo.lock
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
rustbook-en/listings/ch11-writing-automated-tests/listing-11-01/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pub fn add(left: usize, right: usize) -> usize { | ||
pub fn add(left: u64, right: u64) -> u64 { | ||
left + right | ||
} | ||
|
||
|
7 changes: 2 additions & 5 deletions
7
rustbook-en/listings/ch14-more-about-cargo/listing-14-07/add/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[workspace] | ||
|
||
members = [ | ||
"adder", | ||
"add_one", | ||
] | ||
resolver = "2" | ||
members = ["adder", "add_one"] |
6 changes: 0 additions & 6 deletions
6
...en/listings/ch14-more-about-cargo/no-listing-01-workspace-with-adder-crate/add/Cargo.lock
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...en/listings/ch14-more-about-cargo/no-listing-01-workspace-with-adder-crate/add/Cargo.toml
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...tings/ch14-more-about-cargo/no-listing-01-workspace-with-adder-crate/add/adder/Cargo.toml
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ings/ch14-more-about-cargo/no-listing-01-workspace-with-adder-crate/add/adder/src/main.rs
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
rustbook-en/listings/ch14-more-about-cargo/no-listing-01-workspace/add/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[workspace] | ||
resolver = "2" |
7 changes: 2 additions & 5 deletions
7
...-en/listings/ch14-more-about-cargo/no-listing-02-workspace-with-two-crates/add/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[workspace] | ||
|
||
members = [ | ||
"adder", | ||
"add_one", | ||
] | ||
resolver = "2" | ||
members = ["adder", "add_one"] |
7 changes: 2 additions & 5 deletions
7
...ngs/ch14-more-about-cargo/no-listing-03-workspace-with-external-dependency/add/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[workspace] | ||
|
||
members = [ | ||
"adder", | ||
"add_one", | ||
] | ||
resolver = "2" | ||
members = ["adder", "add_one"] |
7 changes: 2 additions & 5 deletions
7
rustbook-en/listings/ch14-more-about-cargo/no-listing-04-workspace-with-tests/add/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[workspace] | ||
|
||
members = [ | ||
"adder", | ||
"add_one", | ||
] | ||
resolver = "2" | ||
members = ["adder", "add_one"] |
Oops, something went wrong.