1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-12-26 00:11:49 +02:00

Compare commits

...

19 Commits
5.2.0 ... 5.2.1

Author SHA1 Message Date
mokou
c923e7af73 chore: release 5.2.1 2022-09-06 12:22:17 +02:00
liv
c838d446ad Merge pull request #1191 from rust-lang/all-contributors/add-memark
docs: add memark as a contributor for content
2022-09-06 12:17:16 +02:00
allcontributors[bot]
50323a3977 docs: update .all-contributorsrc [skip ci] 2022-09-06 10:17:08 +00:00
allcontributors[bot]
7b5ef323c5 docs: update AUTHORS.md [skip ci] 2022-09-06 10:17:07 +00:00
liv
199150fda2 Merge pull request #1171 from memark/patch-1
Add quotes for readability of output
2022-09-06 12:16:54 +02:00
liv
c1b5a0511f Merge pull request #1190 from rust-lang/all-contributors/add-miguelraz
docs: add miguelraz as a contributor for content
2022-09-06 12:14:13 +02:00
allcontributors[bot]
742200d14b docs: update .all-contributorsrc [skip ci] 2022-09-06 10:14:06 +00:00
allcontributors[bot]
900d58d054 docs: update AUTHORS.md [skip ci] 2022-09-06 10:14:05 +00:00
liv
6af86bbf22 Merge pull request #1186 from miguelraz/patch-1
typo fix
2022-09-06 12:13:51 +02:00
liv
4c1070faab Merge pull request #1189 from rust-lang/all-contributors/add-rzrymiak
docs: add rzrymiak as a contributor for content
2022-09-06 12:13:34 +02:00
allcontributors[bot]
f437f8e9ea docs: update .all-contributorsrc [skip ci] 2022-09-06 10:13:27 +00:00
allcontributors[bot]
c9c743967f docs: update AUTHORS.md [skip ci] 2022-09-06 10:13:26 +00:00
liv
88c9a23884 Merge pull request #1085 from rzrymiak/main
Update README.md
2022-09-06 12:13:09 +02:00
liv
1d5700e58a fix(quiz1): add fourth assert 2022-09-06 12:10:53 +02:00
liv
96552e07c2 fix(quiz1): correct explanation once again 2022-09-06 12:09:43 +02:00
Miguel Raz Guzmán Macedo
c97e659d78 typox fix 2022-09-05 10:18:45 -05:00
Magnus Markling
291da61fda Add quotes 2022-08-28 15:12:15 +02:00
Magnus Markling
94bdb708fe Add quotes 2022-08-28 15:10:29 +02:00
rzrymiak
4910bae10f Update README.md
Minor grammatical edit in README.md
2022-07-18 17:00:16 -07:00
11 changed files with 64 additions and 14 deletions

View File

@@ -1542,6 +1542,33 @@
"contributions": [
"content"
]
},
{
"login": "rzrymiak",
"name": "rzrymiak",
"avatar_url": "https://avatars.githubusercontent.com/u/106121613?v=4",
"profile": "https://github.com/rzrymiak",
"contributions": [
"content"
]
},
{
"login": "miguelraz",
"name": "Miguel Raz Guzmán Macedo",
"avatar_url": "https://avatars.githubusercontent.com/u/13056181?v=4",
"profile": "https://github.com/miguelraz",
"contributions": [
"content"
]
},
{
"login": "memark",
"name": "Magnus Markling",
"avatar_url": "https://avatars.githubusercontent.com/u/318504?v=4",
"profile": "https://github.com/memark",
"contributions": [
"content"
]
}
],
"contributorsPerLine": 8,

View File

@@ -219,6 +219,11 @@ authors.
<td align="center"><a href="http://www.gabrielbianconi.com/"><img src="https://avatars.githubusercontent.com/u/1275491?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gabriel Bianconi</b></sub></a><br /><a href="#content-GabrielBianconi" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/Kodylow"><img src="https://avatars.githubusercontent.com/u/74332828?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kody Low</b></sub></a><br /><a href="#content-Kodylow" title="Content">🖋</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/rzrymiak"><img src="https://avatars.githubusercontent.com/u/106121613?v=4?s=100" width="100px;" alt=""/><br /><sub><b>rzrymiak</b></sub></a><br /><a href="#content-rzrymiak" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/miguelraz"><img src="https://avatars.githubusercontent.com/u/13056181?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Miguel Raz Guzmán Macedo</b></sub></a><br /><a href="#content-miguelraz" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/memark"><img src="https://avatars.githubusercontent.com/u/318504?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Magnus Markling</b></sub></a><br /><a href="#content-memark" title="Content">🖋</a></td>
</tr>
</table>
<!-- markdownlint-restore -->

View File

@@ -1,3 +1,17 @@
<a name="5.2.1"></a>
## 5.2.1 (2022-09-06)
#### Fixed
- **quiz1**: Reworded the comment to actually reflect what's going on in the tests.
Also added another assert just to make sure.
- **rc1**: Fixed a typo in the hint.
- **lifetimes**: Add quotes to the `println!` output, for readability.
#### Housekeeping
- Fixed a typo in README.md
<a name="5.2.0"></a>
## 5.2.0 (2022-08-27)

2
Cargo.lock generated
View File

@@ -459,7 +459,7 @@ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
[[package]]
name = "rustlings"
version = "5.1.1"
version = "5.2.1"
dependencies = [
"argh",
"assert_cmd",

View File

@@ -1,6 +1,6 @@
[package]
name = "rustlings"
version = "5.2.0"
version = "5.2.1"
authors = ["Liv <mokou@fastmail.com>", "Carol (Nichols || Goulding) <carol.nichols@gmail.com>"]
edition = "2021"

View File

@@ -57,8 +57,8 @@ If you get a permission denied message, you might have to exclude the directory
Basically: Clone the repository at the latest tag, run `cargo install --path .`.
```bash
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.1.1)
git clone -b 5.1.1 --depth 1 https://github.com/rust-lang/rustlings
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.2.1)
git clone -b 5.2.1 --depth 1 https://github.com/rust-lang/rustlings
cd rustlings
cargo install --force --path .
```
@@ -134,7 +134,7 @@ Once you've completed Rustlings, put your new knowledge to good use! Continue pr
## Uninstalling Rustlings
If you want to remove Rustlings from your system, there's two steps. First, you'll need to remove the exercises folder that the install script created
If you want to remove Rustlings from your system, there are two steps. First, you'll need to remove the exercises folder that the install script created
for you:
```bash

View File

@@ -22,5 +22,5 @@ fn main() {
let string2 = "xyz";
let result = longest(string1.as_str(), string2);
println!("The longest string is {}", result);
println!("The longest string is '{}'", result);
}

View File

@@ -23,5 +23,5 @@ fn main() {
let string2 = String::from("xyz");
result = longest(string1.as_str(), string2.as_str());
}
println!("The longest string is {}", result);
println!("The longest string is '{}'", result);
}

View File

@@ -4,9 +4,11 @@
// - Functions
// - If
// Mary is buying apples. One apple usually costs 2 Rustbucks, but if you buy
// 40 or more at once, each apple only costs 1! Write a function that calculates
// the price of an order of apples given the quantity bought. No hints this time!
// Mary is buying apples. The price of an apple is calculated as follows:
// - An apple costs 2 rustbucks.
// - If Mary buys more than 40 apples, each apple only costs 1 rustbuck!
// Write a function that calculates the price of an order of apples given
// the quantity bought. No hints this time!
// I AM NOT DONE
@@ -18,9 +20,11 @@
fn verify_test() {
let price1 = calculate_price_of_apples(35);
let price2 = calculate_price_of_apples(40);
let price3 = calculate_price_of_apples(65);
let price3 = calculate_price_of_apples(41);
let price4 = calculate_price_of_apples(65);
assert_eq!(70, price1);
assert_eq!(80, price2);
assert_eq!(65, price3);
assert_eq!(41, price3);
assert_eq!(65, price4);
}

View File

@@ -943,7 +943,7 @@ After using drop() to move the Planets out of scope individually, the reference
In the end the sun only has one reference again, to itself. See more at:
https://doc.rust-lang.org/book/ch15-04-rc.html
* Unforunately Pluto is no longer considered a planet :(
* Unfortunately Pluto is no longer considered a planet :(
"""
[[exercises]]

View File

@@ -26,7 +26,7 @@ mod run;
mod verify;
// In sync with crate version
const VERSION: &str = "5.2.0";
const VERSION: &str = "5.2.1";
#[derive(FromArgs, PartialEq, Debug)]
/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code