| Age | Commit message (Collapse) | Author |
|
|
|
fix(installation): Fix rustlings installation check
fixes #147
I did some quick testing with the `-x` check:
```sh
if [ -x "$(notrustlings)" ]
then
echo "notrustlings does not exist"
else
echo "notrustlings appears to exist!"
notrustlings
fi
```
which produced:
```
./test.sh: line 12: notrustlings: command not found
notrustlings appears to exist!
./test.sh: line 17: notrustlings: command not found
```
(consistent with comments in issue)
Using `if ! [ -x "$(command -v <command>)" ]` appears to be the standard way to perform this type of check.
|
|
fix(iterators): Rename iterator3.rs
fixes #155
|
|
chore: Minor text updates
- Make the default rustlings executable text consistent with the README and install script by adding `--force`.
- Remove a missed highlighting character from Issue #133.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove highlighting and syntect
Closes #166 and #122
|
|
|
|
|
|
Fix broken link
|
|
fixed outdated links
The links had the 2018 book in them and they were outdated.
|
|
|
|
|
|
Adds a simple exercise for structures
Thanks for rustlings! Here's a small contribution in return.
|
|
|
|
errorsn.rs: Separate also the hints from each other to avoid accidental viewing
|
|
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
|
|
Rustfmt and ws fixes
|
|
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
|
|
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
|
|
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
|
|
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
|
|
Add not passing integration test
|
|
comers to understand Generics and Error all at once. (#157)
Update errors1.rs - Add Result type signature as it is difficult for new comers to understand Generics and Error all at once.
|
|
Add Result type signature as it is difficult for new comers to understand Generics and Error all at once
|
|
|
|
|
|
This closes #149 and #152
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add errors to exercises that compile without user changes
Hi !
I played a bit with rustlings, and I felt that some exercises were incorrect because they passed the tests without me needing to edit the files!
This gave me the feeling that the exercise was skiped! Especially when I use `rustlings watch`, it is easy to miss an exercise because the compilation error that is displayed is the one of the next exercise ...
It is easy to identify "broken" exercises with:
```bash
% find exercises -name "*.rs" | xargs -n 1 rustlings run
...
✅ Successfully ran exercises/move_semantics/move_semantics4.rs
✅ Successfully tested exercises/test2.rs
```
My suggestion is to make sure that these files trigger a compilation error by adding a simple syntax error (e.g. with `???` in the code that must change) so that our Rustacean can then play with it!
|
|
|
|
|
|
Canonicalize paths to fix path matching
This PR should fix #126. The main solution to the issue was using `canonicalize()` on the paths we create for the exercises from `info.toml` and any user-specified paths, so that path `ends_with` matching will work correctly.
As adding calls to the canonicalize function everywhere requires unwrapping, I also decided to extract a struct representing an exercise and use serde to deserialize the paths from the `info.toml` file up front. I also tried to move the path handling out into the `exercise.rs` file and down into `main.rs` so that it doesn't create as much clutter. There was already a lot of unwrapping and path handling in the other files and I felt like it was getting a bit too repetitive.
If the approach is going too far (too many changes etc.) I'm happy to try to produce a smaller PR that fixes the bug without any refactoring.
|
|
|
|
|
|
|
|
Fix links by deleting book version
|