mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-08 19:59:19 +00:00
Merge branch 'main' into examples
This commit is contained in:
commit
6f9b84722d
@ -2496,6 +2496,33 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"doc"
|
"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,
|
"contributorsPerLine": 8,
|
||||||
|
|||||||
@ -353,6 +353,9 @@ authors.
|
|||||||
<tr>
|
<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/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="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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -25,13 +25,13 @@ You will need to have Rust installed. You can get it by visiting <https://rustup
|
|||||||
Just run:
|
Just run:
|
||||||
|
|
||||||
```bash
|
```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:
|
Or if you want it to be installed to a different path:
|
||||||
|
|
||||||
```bash
|
```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!
|
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:
|
Then, you can run:
|
||||||
|
|
||||||
```ps1
|
```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.
|
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.
|
||||||
|
|||||||
@ -13,7 +13,7 @@ name = "intro2"
|
|||||||
path = "exercises/00_intro/intro2.rs"
|
path = "exercises/00_intro/intro2.rs"
|
||||||
mode = "compile"
|
mode = "compile"
|
||||||
hint = """
|
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
|
# VARIABLES
|
||||||
|
|
||||||
@ -808,7 +808,7 @@ mode = "test"
|
|||||||
hint = """
|
hint = """
|
||||||
Traits can have a default implementation for functions. Structs that implement
|
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
|
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
|
See the documentation at: https://doc.rust-lang.org/book/ch10-02-traits.html#default-implementations
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -362,7 +362,10 @@ fn watch(
|
|||||||
.iter()
|
.iter()
|
||||||
.filter(|e| !e.looks_done() && !filepath.ends_with(&e.path)),
|
.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();
|
clear_screen();
|
||||||
match verify(
|
match verify(
|
||||||
pending_exercises,
|
pending_exercises,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user