feat: Add clippy lints
This is a feature PR which adds the possiblity to create clippy exercises.
Clippy has many awesome linting rules, which can give a deeper understanding about the Rust programming language, therefor I made this PR.
refactor: exercise evaluation
After working a bit on #270, I realized that it'd be useful to first perform a minor refactor of exercise evaluation.
* Now we have standard methods to compile + execute that return `Result`s.
* Success/failure messages are standardized.
chore: fixed merge conflicts from traits exercises added by s-marios
I hope this doesn't step on any toes but I wanted to try the traits exercises from #216 so I updated them to match the new structure with hints included in info.toml
fix(installation): make fatal errors more obvious
I initially ran the installation script without rust installed. The fact that the error message was labeled with WARNING made me unsure whether installation was successful or I needed to re-run after installing rust. There's an error code returned on fatal errors, but this change will make things clearer.
feat: Show a completion message when watching
The completion message is shown only once all exercises succeed and are
not annotated with "I AM NOT DONE." The watch command will also exit
closes#251
Let me know if there are any tests I could add or if the completion message should be tweaked!
The completion message is shown only once all exercises succeed and are
not annotated with "I AM NOT DONE." The watch command will also exit
closes#251
feat: Add type conversion and parsing exercises
This pull request adds exercises for converting values into specific types. The exercises uses string to struct type conversions, but most of the traits in the exercises can handle more than just string parsing and conversions.
The following traits are covered:
1. `From` and `Into`
2. `TryFrom` and `TryInto`
3. `AsRef`
4. `FromStr`
The `as` operator is also covered.
After being stuck on exercise enums3.rs for about an hour or two, having read the entire chapter on enums 2-3 times, and still being unable to complete the exercise, i started broadening my reading. I finally found the answer in the rust docs via google.