Merge branch 'main' into examples

This commit is contained in:
Sam 2023-11-20 12:35:32 +03:00 committed by GitHub
commit 6f9b84722d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 6 deletions

View File

@ -2496,6 +2496,33 @@
"contributions": [
"doc"
]
},
{
"login": "0atman",
"name": "Tristram Oaten",
"avatar_url": "https://avatars.githubusercontent.com/u/114097?v=4",
"profile": "http://0atman.com",
"contributions": [
"content"
]
},
{
"login": "danieltinazzi",
"name": "Daniel Tinazzi",
"avatar_url": "https://avatars.githubusercontent.com/u/11833533?v=4",
"profile": "https://github.com/danieltinazzi",
"contributions": [
"content"
]
},
{
"login": "raymon-roos",
"name": "Raymon Roos",
"avatar_url": "https://avatars.githubusercontent.com/u/38888470?v=4",
"profile": "https://github.com/raymon-roos",
"contributions": [
"content"
]
}
],
"contributorsPerLine": 8,

View File

@ -353,6 +353,9 @@ authors.
<tr>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/markgreene74"><img src="https://avatars.githubusercontent.com/u/18945890?v=4?s=100" width="100px;" alt="markgreene74"/><br /><sub><b>markgreene74</b></sub></a><br /><a href="https://github.com/rust-lang/rustlings/commits?author=markgreene74" title="Code">💻</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/VeeDeltaVee"><img src="https://avatars.githubusercontent.com/u/45564258?v=4?s=100" width="100px;" alt="Versha Dhankar"/><br /><sub><b>Versha Dhankar</b></sub></a><br /><a href="https://github.com/rust-lang/rustlings/commits?author=VeeDeltaVee" title="Documentation">📖</a></td>
<td align="center" valign="top" width="12.5%"><a href="http://0atman.com"><img src="https://avatars.githubusercontent.com/u/114097?v=4?s=100" width="100px;" alt="Tristram Oaten"/><br /><sub><b>Tristram Oaten</b></sub></a><br /><a href="#content-0atman" title="Content">🖋</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/danieltinazzi"><img src="https://avatars.githubusercontent.com/u/11833533?v=4?s=100" width="100px;" alt="Daniel Tinazzi"/><br /><sub><b>Daniel Tinazzi</b></sub></a><br /><a href="#content-danieltinazzi" title="Content">🖋</a></td>
<td align="center" valign="top" width="12.5%"><a href="https://github.com/raymon-roos"><img src="https://avatars.githubusercontent.com/u/38888470?v=4?s=100" width="100px;" alt="Raymon Roos"/><br /><sub><b>Raymon Roos</b></sub></a><br /><a href="#content-raymon-roos" title="Content">🖋</a></td>
</tr>
</tbody>
</table>

View File

@ -25,13 +25,13 @@ You will need to have Rust installed. You can get it by visiting <https://rustup
Just run:
```bash
curl -L sh.rustlings.cool | bash
curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash
```
Or if you want it to be installed to a different path:
```bash
curl -L sh.rustlings.cool | bash -s mypath/
curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh | bash -s mypath/
```
This will install Rustlings and give you access to the `rustlings` command. Run it to get started!
@ -61,7 +61,7 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Then, you can run:
```ps1
Start-BitsTransfer -Source https://ps1.rustlings.cool -Destination $env:TMP/install_rustlings.ps1; Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression $env:TMP/install_rustlings.ps1
Start-BitsTransfer -Source https://raw.githubusercontent.com/rust-lang/rustlings/main/install.ps1 -Destination $env:TMP/install_rustlings.ps1; Unblock-File $env:TMP/install_rustlings.ps1; Invoke-Expression $env:TMP/install_rustlings.ps1
```
To install Rustlings. Same as on MacOS/Linux, you will have access to the `rustlings` command after it. Keep in mind that this works best in PowerShell, and any other terminals may give you errors.

View File

@ -13,7 +13,7 @@ name = "intro2"
path = "exercises/00_intro/intro2.rs"
mode = "compile"
hint = """
Add an argument after the format string."""
The compiler is informing us that we've got the name of the print macro wrong, and has suggested an alternative."""
# VARIABLES
@ -808,7 +808,7 @@ mode = "test"
hint = """
Traits can have a default implementation for functions. Structs that implement
the trait can then use the default version of these functions if they choose not
implement the function themselves.
to implement the function themselves.
See the documentation at: https://doc.rust-lang.org/book/ch10-02-traits.html#default-implementations
"""

View File

@ -362,7 +362,10 @@ fn watch(
.iter()
.filter(|e| !e.looks_done() && !filepath.ends_with(&e.path)),
);
let num_done = exercises.iter().filter(|e| e.looks_done()).count();
let num_done = exercises
.iter()
.filter(|e| e.looks_done() && !filepath.ends_with(&e.path))
.count();
clear_screen();
match verify(
pending_exercises,