Commit graph

2323 commits

Author SHA1 Message Date
marisa
a47a62172a 1.5.1 2019-11-11 14:02:27 +01:00
marisa
f72e5a8f05 fix(structs1): Remove misleading comment 2019-11-11 13:57:59 +01:00
marisa
fbe91a67a4 fix(threads): Move Threads behind SLT
Closes #205.
2019-11-11 13:48:09 +01:00
marisa
6dcecb38a4 fix(strings): Move Strings before Structs
Closes #204.
2019-11-11 13:46:42 +01:00
marisa
dcfb427b09 fix(errors3): Update hint
Closes #185.
2019-11-11 13:37:43 +01:00
marisa
ad03d180c9 fix(if1): Remove return reference
This closes #153.
2019-11-11 13:34:21 +01:00
bors
3232a4d60d Auto merge of #228 - WofWca:clear-screen, r=fmoko
improvement(watch): clear screen before each `verify()`

Closes #146
It seems to me that #227 wasn't really fixing the issue.
2019-11-09 15:23:53 +00:00
WofWca
3aff590855 improvement(watch): clear screen before each verify()
Closes #146
2019-11-09 22:24:24 +08:00
marisa
c8babbad27 1.5.0 2019-11-09 10:52:20 +01:00
bors
c6dad28ddc Auto merge of #224 - nyxtom:feat-enums, r=fmoko
feat: Add enums exercises

Creates an exhaustive list of enum exercises. This goes through the basics of different ways to derive enums with mixed data type variants, as well as the use of the all important `match` operator.
2019-11-09 09:41:36 +00:00
bors
fea81419cd Auto merge of #227 - workingjubilee:watch-clears-terminal, r=fmoko
watch: clears terminal before entering loop

Fixes #146

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.

Note that the escape character is chosen for compatibility reasons, because different shells/terminals can change which commands they accept or have installed, betting on what other commands are in use to collect data seems risky, and just expecting them to implement ANSI escape code sequences is more reliable. This seems especially true since Windows is seeking more UNIX compatibility in its terminals going forward, even though it doesn't implement the POSIX standard per se.
2019-11-09 09:31:50 +00:00
Jubilee Young
83be517e77 watch: clears terminal before entering loop
If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.
2019-11-09 00:57:36 -08:00
marisa
79a569422c
fix: Rewrite test1 logic 2019-10-29 20:53:41 +01:00
bors
1e0b12e37e Auto merge of #225 - ssweeny:fix/test1-wording, r=fmoko
chore: Clarify comment in exercises/test1.rs

closes #194

The author of issue #194 suggests that the wording of the comment is at
least ambiguous about the desired results. I believe this change more
clearly describes the expectation of the exercise.
2019-10-29 13:37:30 +00:00
Thomas Holloway
dc15032112 feat: Add enums exercises 2019-10-28 22:49:49 -05:00
Scott Sweeny
2821227acf chore: Clarify comment in exercises/test1.rs
closes #194

The author of issue #194 suggests that the wording of the comment is at
least ambiguous about the desired results. I believe this change more
clearly describes the expectation of the exercise.
2019-10-28 23:08:46 -04:00
bors
2191ef7eee Auto merge of #219 - vyaslav:master, r=fmoko
Added exercise for struct update syntax

Added one exercise for struct update syntax `struct2.rs`
2019-10-28 22:56:54 +00:00
marisa
4c2cf6da75
fix(option1): Fix arguments passed to assert! macro (#222)
fix(option1): Fix arguments passed to assert! macro
2019-10-26 00:27:40 +02:00
marisa
0f3d6d871e
chore: Bump version in Cargo.lock (#223)
chore: Bump version in Cargo.lock
2019-10-26 00:27:17 +02:00
Niklas Anderson
bd007d4617 chore: Bump version in Cargo.lock 2019-10-25 14:57:30 -07:00
Niklas Anderson
ead4f7af9e fix(option1): Fix arguments passed to assert! macro 2019-10-25 14:27:24 -07:00
marisa
4808b5b3ba
Update README to show latest version, for those who copy/paste (#221)
Update README to show latest version, for those who copy/paste
2019-10-25 01:54:10 +02:00
Mark Provan
f3da6796b9
Update README to show latest version, for those who copy/paste 2019-10-24 13:56:14 +01:00
marisa
cece12e87e docs: Add automatic Windows support to Readme 2019-10-23 13:01:07 +02:00
marisa
68d1727cac chore(ci): Remove GitHub actions for now 2019-10-23 12:56:07 +02:00
bors
8a2e13b20a Auto merge of #220 - gdoenlen:master, r=fmoko
Add windows install script

Adds a powershell install script for windows users that are at least
running powershell 5. It is almost a direct port of install.sh.
This would be used to automatically download the script much like
curl | bash, but with:

`Invoke-WebRequest https://urltoscript.com | Select-Object
-ExpandProperty Content | Out-File $env:TMP/install_rustlings.ps1;
Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression
$env:TMP/install_rustlings.ps1`
2019-10-23 10:49:36 +00:00
George Doenlen
ee311b8e5c remove execution policy check 2019-10-22 22:26:33 -04:00
George Doenlen
f0de6c4e92 Add basic windows install script.
Adds a powershell install script for windows users that are at least
running powershell 5. It is almost a direct port of install.sh.
This would be used to automatically download the script much like
curl | bash, but with:

`Invoke-WebRequest https://urltoscript.com | Select-Object
-ExpandProperty Content | Out-File $env:TMP/install_rustlings.ps1;
Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression
$env:TMP/install_rustlings.ps1`
2019-10-22 21:56:50 -04:00
Viacheslav Avramenko
1c4c8764ed feat: Added exercise for struct update syntax 2019-10-21 14:50:59 +02:00
bors
e6161a6f58 Auto merge of #217 - timthelion:timthelion-readme-run, r=fmoko
Tense in README

Don't see why run should be past tense.  At least in my native General American dialect it shouldn't be.
2019-09-25 14:09:52 +00:00
Timothy Hobbs
8c0fe59c90
Tense in README
Don't see why run should be past tense.  At least in my native General American dialect it shouldn't be.
2019-09-07 16:17:45 +00:00
komaeda
17690b3add
chore(ci): Add GitHub Actions CI file 2019-08-21 13:23:38 +02:00
bors
f9987c8bed Auto merge of #212 - sosnowski:fix/add-dyn-trait, r=komaeda
fix(errorsn.rs) Update the deprecated syntax by adding dyn to trait o…

fix(errorsn.rs) Update the deprecated syntax by adding dyn to trait objects.

closes #211

Related issue: https://github.com/rust-lang/rustlings/issues/211
2019-08-21 11:01:11 +00:00
Damian S
8109cbad97 fix(errorsn.rs) Update the deprecated syntax by adding dyn to trait objectscloses #211 2019-08-21 11:44:42 +01:00
bors
c5bb32253b Auto merge of #209 - Dylnuge:slice-assert, r=komaeda
fix(primitive_types4): Fail on a slice covering the wrong area

I noticed this issue and it seems like a similar one was raised/fixed in #160 this way. This is my first contribution to this repo (or any Rust project) so let me know if I messed up or need to fix anything!

---
This commit converts primitive_types4 to a test and asserts that the
slice given is equal to the expected slice.

The intent of the primitive_types4 exercise appears to be to ensure the
user understands inclusive and exclusive bounds as well as slice syntax.
`rustlings` commands using `compile` do not verify that a specific
println is reached and, in the case of `watch` and `verify` (but not
`run`), they do not output the `println`s at all.

This fix is semantically similar to #198. It does not take a stance on
the correct way to handle this for all exercises; see #127. There are
likely other exercises whose intent are masked by this issue.
2019-08-18 08:24:44 +00:00
Dylan Nugent
5b1e673cec fix(primitive_types4): Fail on a slice covering the wrong area
This commit converts primitive_types4 to a test and asserts that the
slice given is equal to the expected slice.

The intent of the primitive_types4 exercise appears to be to ensure the
user understands inclusive and exclusive bounds as well as slice syntax.
`rustlings` commands using `compile` do not verify that a specific
println is reached and, in the case of `watch` and `verify` (but not
`run`), they do not output the `println`s at all.

This fix is semantically similar to #198. It does not take a stance on
the correct way to handle this for all exercises; see #127. There are
likely other exercises whose intent are masked by this issue.
2019-08-17 17:16:19 -07:00
bors
2cd06826c0 Auto merge of #206 - ajaxm:ajaxm/rustup-update, r=komaeda
Suggest rustup update in readme

I'm pretty new to Rust. I tried installing rustlings for the first time and got this error:
```
$> cargo install --force --path .
error: `/Users/ajax/projects/rust/rustlings` is not a crate root; specify a crate to install from crates.io, or use --path or --git to specify an alternate source

Caused by:
  failed to parse manifest at `/Users/ajax/projects/rust/rustlings/Cargo.toml`

Caused by:
  editions are unstable

Caused by:
  feature `edition` is required

this Cargo does not support nightly features, but if you
switch to nightly channel you can add
`cargo-features = ["edition"]` to enable this feature
```

I'm not sure if the answer was to run `rustup update` but I noticed that I was running Rust 1.29.0, so updated to 1.36.0 and got it working. If there's a way to specify a minimum required version, pls let me know.

Lastly, the whitespace changes were automatic from my editor. What's the convention here for making such updates? Thanks!
2019-08-13 10:04:36 +00:00
marisa
4f0c5a8d49
1.4.1 2019-08-13 11:59:17 +02:00
bors
3011251da7 Auto merge of #208 - EnricoMiccoli:patch-1, r=komaeda
chore: Correct typo in hint text
2019-08-12 15:24:17 +00:00
Enrico Miccoli
76b4cb5c00
chore: Correct typo 2019-08-12 11:45:40 +02:00
bors
f83af3c25d Auto merge of #207 - nkanderson:fix_iterators2, r=komaeda
Fix iterators2

A couple of small changes to the `iterators2` exercise. @Jesse-Cameron, it looks like you contributed this exercise, so I wanted to check and see if these changes are in line with your intentions. Happy to adjust if they're not :)
2019-08-11 15:44:40 +00:00
Niklas Anderson
e3931718fb chore(iterators2): Add exercise instructions 2019-08-09 07:38:21 -07:00
Niklas Anderson
4cde86643e fix(iterators2): Remove syntax resulting in misleading error message
closes #199
2019-08-09 07:37:27 -07:00
Ajax Manohar
9ee3207280 docs: Suggest rustup update in readme 2019-08-03 10:49:37 -07:00
bors
e696a07190 Auto merge of #201 - zdzc:patch-1, r=komaeda
docs: Fix wrong title

fix #200
2019-07-27 19:07:22 +00:00
Andre Pratama
e0db987441
docs: Fix wrong title
fix #200
2019-07-27 22:14:48 +07:00
bors
1890b0019d Auto merge of #198 - nkanderson:160_options1-add-test, r=komaeda
fix(option1): Add test for prematurely passing exercise

Fixes the bug referenced in #160, but does not address the larger feature work referenced by the issue.
2019-07-27 10:32:47 +00:00
Niklas Anderson
a750e4a1a3 fix(option1): Add test for prematurely passing exercise
Fixes the bug referenced in #160, but does not address the larger feature work referenced by the issue.
2019-07-26 16:58:12 -07:00
bors
1c789dda08 Auto merge of #192 - petemcfarlane:patch-2, r=komaeda
fix(test1): Swap assertion parameter order

`Expected` should come before `actual`, other wise it leads to confusing compiler messages, e.g.
```
note: expected type `()`
         found type `{integer}`
```
There may be other tests that need updating, but this is as far as I am through the Rustlings course right now :)
2019-07-13 16:27:14 +00:00
Pete McFarlane
4086d463a9
fix(test1): Swap assertion parameter order
`Expected` should come before `actual`, other wise it leads to confusing compiler messages, e.g.
```
note: expected type `()`
         found type `{integer}`
```
2019-07-13 13:31:57 +01:00