mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-05-24 05:06:06 +02:00
Compare commits
3 Commits
fa0ff125bd
...
f0a02c777e
Author | SHA1 | Date | |
---|---|---|---|
Robert Schäfer | f0a02c777e | ||
mo8it | 71053101c3 | ||
Robert Schäfer | 1832aba31e |
|
@ -74,13 +74,13 @@ If you get a permission denied message, you might have to exclude the directory
|
||||||
|
|
||||||
## Manually
|
## Manually
|
||||||
|
|
||||||
Basically: Clone the repository at the latest tag, run `cargo install --path .`.
|
Basically: Clone the repository at the latest tag, run `cargo install --locked --path .`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.6.1)
|
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.6.1)
|
||||||
git clone -b 5.6.1 --depth 1 https://github.com/rust-lang/rustlings
|
git clone -b 5.6.1 --depth 1 https://github.com/rust-lang/rustlings
|
||||||
cd rustlings
|
cd rustlings
|
||||||
cargo install --force --path .
|
cargo install --locked --force --path .
|
||||||
```
|
```
|
||||||
|
|
||||||
If there are installation errors, ensure that your toolchain is up to date. For the latest, run:
|
If there are installation errors, ensure that your toolchain is up to date. For the latest, run:
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
// print both types of report card!
|
// print both types of report card!
|
||||||
//
|
//
|
||||||
// Make the necessary code changes in the struct ReportCard and the impl block
|
// Make the necessary code changes in the struct ReportCard and the impl block
|
||||||
// to support alphabetical report cards. Change the Grade in the second test to
|
// to support alphabetical report cards.
|
||||||
// "A+" to show that your changes allow alphabetical grades.
|
|
||||||
//
|
//
|
||||||
// Execute `rustlings hint quiz3` or use the `hint` watch subcommand for a hint.
|
// Execute `rustlings hint quiz3` or use the `hint` watch subcommand for a hint.
|
||||||
|
|
||||||
|
@ -50,9 +49,8 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn generate_alphabetic_report_card() {
|
fn generate_alphabetic_report_card() {
|
||||||
// TODO: Make sure to change the grade here after you finish the exercise.
|
|
||||||
let report_card = ReportCard {
|
let report_card = ReportCard {
|
||||||
grade: 2.1,
|
grade: "A+",
|
||||||
student_name: "Gary Plotter".to_string(),
|
student_name: "Gary Plotter".to_string(),
|
||||||
student_age: 11,
|
student_age: 11,
|
||||||
};
|
};
|
||||||
|
|
|
@ -78,7 +78,7 @@ Set-Location $path
|
||||||
git checkout -q tags/$version
|
git checkout -q tags/$version
|
||||||
|
|
||||||
Write-Host "Installing the 'rustlings' executable..."
|
Write-Host "Installing the 'rustlings' executable..."
|
||||||
cargo install --force --path .
|
cargo install --locked --force --path .
|
||||||
if (!(Get-Command rustlings -ErrorAction SilentlyContinue)) {
|
if (!(Get-Command rustlings -ErrorAction SilentlyContinue)) {
|
||||||
Write-Host "WARNING: Please check that you have '~/.cargo/bin' in your PATH environment variable!"
|
Write-Host "WARNING: Please check that you have '~/.cargo/bin' in your PATH environment variable!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ echo "Checking out version $Version..."
|
||||||
git checkout -q ${Version}
|
git checkout -q ${Version}
|
||||||
|
|
||||||
echo "Installing the 'rustlings' executable..."
|
echo "Installing the 'rustlings' executable..."
|
||||||
cargo install --force --path .
|
cargo install --locked --force --path .
|
||||||
|
|
||||||
if ! [ -x "$(command -v rustlings)" ]
|
if ! [ -x "$(command -v rustlings)" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue