Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dezoito/rustlings-commented-solutions
Commented solutions for Rustlings 5.6.1
https://github.com/dezoito/rustlings-commented-solutions
beginner rust rustlings-solution
Last synced: 3 days ago
JSON representation
Commented solutions for Rustlings 5.6.1
- Host: GitHub
- URL: https://github.com/dezoito/rustlings-commented-solutions
- Owner: dezoito
- Created: 2023-10-14T18:34:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-14T21:20:54.000Z (about 1 year ago)
- Last Synced: 2024-10-11T18:59:07.999Z (27 days ago)
- Topics: beginner, rust, rustlings-solution
- Language: Rust
- Homepage:
- Size: 65.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🦀 Commented solutions for Rustlings 5.6.1
This repository contains **commented** solutions for the [Ruslings](https://github.com/rust-lang/rustlings/) exercises, adding brief notes on what was necessary to complete the challenges (except where too obvious).
Whenever relevant, I also added different ways that the code could be written (in many cases in a more idiomatic way).
### Note on comments
I use the [Better Comments](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments) VSCode extension.
While regular comments are either original to the files or used to include different solutions in the same code block, comments in the format below were used to display notes or explanations (notice the "\*"):
```rs
// * This is an explanation
```### References
I used this excellent repository as a learning reference, and to compare my solutions to already existing ones:
https://github.com/wh5a/rustlings-solutions/
The rusting exercises, particulary the hints, offer many direct references to the documentation.
## Exercise to [Book](https://doc.rust-lang.org/book/) Chapter mapping
| Exercise | Book Chapter |
| --------------- | ------------ |
| variables | §3.1 |
| functions | §3.3 |
| if | §3.5 |
| primitive_types | §3.2, §4.3 |
| vecs | §8.1 |
| move_semantics | §4.1-2 |
| structs | §5.1, §5.3 |
| enums | §6, §18.3 |
| strings | §8.2 |
| modules | §7 |
| hashmaps | §8.3 |
| options | §10.1 |
| error_handling | §9 |
| generics | §10 |
| traits | §10.2 |
| tests | §11.1 |
| lifetimes | §10.3 |
| iterators | §13.2-4 |
| threads | §16.1-3 |
| smart_pointers | §15, §16.3 |
| macros | §19.6 |
| clippy | §21.4 |
| conversions | n/a |