Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 31 additions & 25 deletions Cargo.lock

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

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ edition = "2024" # On Update: Update the edition of `rustfmt` in `dev check` and
rust-version = "1.85"

[workspace.dependencies]
serde = { version = "1.0.219", features = ["derive"] }
toml_edit = { version = "0.22.24", default-features = false, features = ["parse", "serde"] }
serde = { version = "1.0", features = ["derive"] }
toml_edit = { version = "0.22", default-features = false, features = ["parse", "serde"] }

[package]
name = "rustlings"
Expand All @@ -46,21 +46,21 @@ include = [
]

[dependencies]
anyhow = "1.0.97"
clap = { version = "4.5.32", features = ["derive"] }
crossterm = { version = "0.28.1", default-features = false, features = ["windows", "events"] }
notify = "8.0.0"
os_pipe = "1.2.1"
anyhow = "1.0"
clap = { version = "4.5", features = ["derive"] }
crossterm = { version = "0.28", default-features = false, features = ["windows", "events"] }
notify = "8.0"
os_pipe = "1.2"
rustlings-macros = { path = "rustlings-macros", version = "=6.4.0" }
serde_json = "1.0.140"
serde_json = "1.0"
serde.workspace = true
toml_edit.workspace = true

[target.'cfg(not(windows))'.dependencies]
rustix = { version = "1.0.2", default-features = false, features = ["std", "stdio", "termios"] }
rustix = { version = "1.0", default-features = false, features = ["std", "stdio", "termios"] }

[dev-dependencies]
tempfile = "3.19.0"
tempfile = "3.19"

[profile.release]
panic = "abort"
Expand Down
2 changes: 1 addition & 1 deletion exercises/08_enums/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Useful in combination with enums is Rust's "pattern matching" facility, which ma
## Further information

- [Enums](https://doc.rust-lang.org/book/ch06-00-enums.html)
- [Pattern syntax](https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html)
- [Pattern syntax](https://doc.rust-lang.org/book/ch19-03-pattern-syntax.html)
2 changes: 1 addition & 1 deletion exercises/13_error_handling/errors5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
// In short, this particular use case for boxes is for when you want to own a
// value and you care only that it is a type which implements a particular
// trait. To do so, The `Box` is declared as of type `Box<dyn Trait>` where
// trait. To do so, the `Box` is declared as of type `Box<dyn Trait>` where
// `Trait` is the trait the compiler looks for on any value used in that
// context. For this exercise, that context is the potential errors which
// can be returned in a `Result`.
Expand Down
3 changes: 2 additions & 1 deletion exercises/21_macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ of exercises to Rustlings, but is all about learning to write Macros.

## Further information

- [Macros](https://doc.rust-lang.org/book/ch19-06-macros.html)
- [The Rust Book - Macros](https://doc.rust-lang.org/book/ch20-05-macros.html)
- [The Little Book of Rust Macros](https://veykril.github.io/tlborm/)
- [Rust by Example - macro_rules!](https://doc.rust-lang.org/rust-by-example/macros.html)
2 changes: 1 addition & 1 deletion rustlings-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ include = [
proc-macro = true

[dependencies]
quote = "1.0.37"
quote = "1.0"
serde.workspace = true
toml_edit.workspace = true

Expand Down
2 changes: 0 additions & 2 deletions solutions/06_move_semantics/move_semantics4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ fn main() {

#[cfg(test)]
mod tests {
// TODO: Fix the compiler errors only by reordering the lines in the test.
// Don't add, change or remove any line.
#[test]
fn move_semantics4() {
let mut x = Vec::new();
Expand Down
2 changes: 0 additions & 2 deletions solutions/19_smart_pointers/rc1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ mod tests {
println!("reference count = {}", Rc::strong_count(&sun)); // 7 references
saturn.details();

// TODO
let uranus = Planet::Uranus(Rc::clone(&sun));
println!("reference count = {}", Rc::strong_count(&sun)); // 8 references
uranus.details();

// TODO
let neptune = Planet::Neptune(Rc::clone(&sun));
println!("reference count = {}", Rc::strong_count(&sun)); // 9 references
neptune.details();
Expand Down
Loading