Commit Graph

46 Commits (main)

Author SHA1 Message Date
mo8it a27741b131 Merge branch 'main' into performance 2 months ago
Mo 07dec76f7c
Merge pull request #1916 from mo8it/command
Pipe the output of command to null instead of capturing and ignoring it
2 months ago
mo8it 853d0593d0 Derive Eq when PartialEq is derived 2 months ago
mo8it 078f6ffc1c Add comments 2 months ago
mo8it 7a6f71f090 Fix context of previous lines and improve readability 2 months ago
mo8it d911586788 Pipe the output to null instead of capturing and ignoring it 2 months ago
mo8it bdf826a026 Make "I AM NOT DONE" caseless 2 months ago
mo8it c0c112985b Replace regex with winnow 2 months ago
mo8it 0aeaccc3a5 Optimize state 2 months ago
markgreene74 3c4fde4610 fix(watch): update the CLIPPY_CARGO_TOML_PATH
... to reflect the changes to the exercise directory names.

The path exercises/clippy replaced with exercises/22_clippy.

closes #1726
8 months ago
DocWilco 511e334365 fix(cli): stop littering pdb files on windows 8 months ago
jyn b88c23897f Give a more helpful error when a file is missing
Previously, this would just say "missing file". Now it shows the path of the file that was missing,
which should make it easier to debug what went wrong.
8 months ago
mo8it 571bab20c1 Run clippy --fix 9 months ago
wjwrh 1721ddc231 Fix the problem of different edition between rustc and rust-analyzer 1 year ago
Yuri Astrakhan 2940ad059d Apply uninlined-format-args clippy lint
This lint should also be applied to the excersies,
but I am not certain how to run it for all non-crate individual files.

To re-run:

```
rustup run nightly cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2 years ago
KatanaFluorescent a500ed2c3c
change edition to 2021 in exercices.rs
workaround for this issue https://github.com/rust-lang/rustlings/issues/1022
2 years ago
radicale 71a06044e6
fix(clippy1): Set clippy::float_cmp lint to deny (#907) 2 years ago
Galih wisnuaji 9b27e8d993 chore : replace filter_map() with find_map() 2 years ago
LIU JIE 06d5c0973a
fix(cli): typo in exercise.rs (#848) 3 years ago
Ben Armstead 1cd9328a58
fix(cli): remove unnecessary borrows (#829)
* Update dependencies

* Format better and remove unnecessary borrows
3 years ago
mokou 7928122fce feat: Replace clap with argh
I’ve been wanting to do this for a while, but always procrastinated on it. We’ve been using Clap since the 2.0 rewrite, but Clap is known to be a fairly heavy library. Since Rustlings is usually peoples’ first contact with a Rust compilation, I think it’s in our best interests that this complation is as fast as possible. In effect, replacing Clap with the smaller, structopt-style `argh` reduces the amount of crates needing to be compiled from 82 to 60.

I also think this makes the code way easier to read, we don’t need to use Clap’s methods anymore, but can switch over to using pure Rust methods, e.g., switches are booleans, options are Option<String>s or the like, and subcommands are just structs.
3 years ago
Zerotask bd48544e25
style: formatted files with rustfmt 3 years ago
Matt Lebl 01e7f27aa6 refactor: change from match to if for NO_EMOJI 3 years ago
Matt Lebl 8d62a99637 feat: Replace emojis when NO_EMOJI env variable present 3 years ago
circumspect 833df0b8b3
chore: fix typo
Co-authored-by: Chenkail <40770208+Chenkail@users.noreply.github.com>
3 years ago
Abdou Seck 0b9220c1fc Add looks_done method to Exercise to expose a resolution state 3 years ago
Roberto Vidal 5643ef05bc fix: more unique temp_file 4 years ago
Alexx Roche c03e1e6c6c
chore: fixed test name 4 years ago
Étienne Barrié 81f8c2f83c chore: Run cargo fmt 4 years ago
mokou 55a9284665 chore: Move from master branch to main branch 4 years ago
Abdou Seck 8ad5f9bf53 feat: Add a --nocapture option to display test harnesses' outputs
This new feature can be accessed by invoking rustlings with --nocapture.

Both unit and integration tests added.

closes #262

BREAKING CHANGES:
The following function take a new boolean argument:
	* `run`
	* `verify`
	* `test`
	* `compile_and_test`
4 years ago
Rohan Jain 3ab084a421 fix(run): compile clippy exercise files
Additionally to running clippy, also compile the exercise file so that
`rustling run clippy1` works after a successful completion of the
exercise.

closes #291

Signed-off-by: Rohan Jain <crodjer@gmail.com>
4 years ago
Mario Reder 1e2fd9c92f feat: Add clippy lints
- adds a new 'clippy' category for exercises
- clippy exercises should throw no warnings
- install script now also installs clippy

is related to https://github.com/rust-lang/rust-clippy/issues/2604
4 years ago
Roberto Vidal 43dc31193a refactor: exercise evaluation
Exercise evaluation (compilation + execution) now uses Results
Success/failure messages are standardized
4 years ago
marisa 48c35bcfbc fix tests 5 years ago
marisa ec2d4bd3ee
Merge branch 'master' into refactor-hints 5 years ago
marisa 9bdb0a12e4 feat: Refactor hint system
Hints are now accessible using the CLI subcommand `rustlings hint
<exercise name`.

BREAKING CHANGE: This fundamentally changes the way people interact with exercises.
5 years ago
Roberto Vidal 2cdd61294f feat: improve `watch` execution mode
The `watch` command now requires user action to move to the next
exercise.

BREAKING CHANGE: this changes the behavior of `watch`.
5 years ago
marisa 627cdc07d0 feat: Index exercises by name
BREAKING CHANGE: This changes the way you use `rustlings run` by now
requiring an abridged form of the previous filename, e.g:

`rustlings run exercises/if/if1.rs` becomes
`rustlings run if1`
5 years ago
Eddy Petrisor ca6bf966dd Cargo fmt the rustlings application code
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
5 years ago
liv 35c3d0b3fc Revert --nocapture flag
This closes #149 and #152
5 years ago
liv f2c48cfac5 fix the --nocapture functionality 5 years ago
liv bfcf38c8bc
damn it 5 years ago
liv 9e328da641
use -- --nocapture when testing 5 years ago
Chris Pearce 77de6e5d6a Clean up test includes for File and Path 5 years ago
Chris Pearce d01a71f7de Extract exercise struct to encapsulate path logic 5 years ago