rust_exercises.git
4 weeks agoAdd link to paperback.
Luca Palmieri [Fri, 27 Sep 2024 08:13:15 +0000 (10:13 +0200)]
Add link to paperback.

5 weeks agoTypo (#154)
David Parra [Sun, 22 Sep 2024 06:12:14 +0000 (01:12 -0500)]
Typo (#154)

Thanks for such a great book, found a small typo.

5 weeks agoMerge pull request #133 from mainmatter/style-book
Marco Otte-Witte [Thu, 19 Sep 2024 09:47:52 +0000 (11:47 +0200)]
Merge pull request #133 from mainmatter/style-book

Style book

5 weeks agoMerge pull request #150 from mainmatter/LukeMathWalker-patch-1
Marco Otte-Witte [Thu, 19 Sep 2024 09:40:52 +0000 (11:40 +0200)]
Merge pull request #150 from mainmatter/LukeMathWalker-patch-1

Don't omit macros from PDF and ePUB versions

5 weeks agoDon't omit macros from PDF and ePUB versions
Luca Palmieri [Thu, 19 Sep 2024 08:33:03 +0000 (10:33 +0200)]
Don't omit macros from PDF and ePUB versions

6 weeks agoadd test coverage for IndexMut<&TicketId> (#142)
Abdelrahman Omar [Wed, 11 Sep 2024 09:37:23 +0000 (12:37 +0300)]
add test coverage for IndexMut<&TicketId> (#142)

6 weeks agoRemove duplicated mention of slices in 00_intro.md (#144)
Tobias Hermann [Wed, 11 Sep 2024 09:36:58 +0000 (11:36 +0200)]
Remove duplicated mention of slices in 00_intro.md (#144)

Slices are already mentioned in bullet point 4, so they can be removed from bullet point 2.

2 months agomove comment to meaningful place
Marco Otte-Witte [Tue, 27 Aug 2024 07:14:20 +0000 (09:14 +0200)]
move comment to meaningful place

2 months agomake fontsize 1pt smaller
Marco Otte-Witte [Tue, 27 Aug 2024 07:13:38 +0000 (09:13 +0200)]
make fontsize 1pt smaller

2 months agouse less teal for sh theme
Marco Otte-Witte [Thu, 22 Aug 2024 13:38:27 +0000 (15:38 +0200)]
use less teal for sh theme

2 months agoactually use custom highlighting theme
Marco Otte-Witte [Thu, 22 Aug 2024 13:38:18 +0000 (15:38 +0200)]
actually use custom highlighting theme

2 months agoremove background color on operators
Marco Otte-Witte [Thu, 22 Aug 2024 13:25:58 +0000 (15:25 +0200)]
remove background color on operators

2 months agoadd lost settings for print version back in
Marco Otte-Witte [Thu, 22 Aug 2024 13:22:03 +0000 (15:22 +0200)]
add lost settings for print version back in

2 months agocopy config to paperback
Marco Otte-Witte [Tue, 20 Aug 2024 16:11:31 +0000 (18:11 +0200)]
copy config to paperback

2 months agocustom syntax highlighting
Marco Otte-Witte [Tue, 20 Aug 2024 15:37:33 +0000 (17:37 +0200)]
custom syntax highlighting

2 months agoset link and url styles
Marco Otte-Witte [Tue, 20 Aug 2024 14:54:53 +0000 (16:54 +0200)]
set link and url styles

2 months agouse Core Sans font
Marco Otte-Witte [Tue, 20 Aug 2024 13:48:55 +0000 (15:48 +0200)]
use Core Sans font

2 months agoMerge pull request #131 from ehershey/grammar
Henk Oordt [Wed, 14 Aug 2024 07:38:27 +0000 (09:38 +0200)]
Merge pull request #131 from ehershey/grammar

Grammar fixups

2 months agoGrammar fixups
Ernie Hershey [Tue, 13 Aug 2024 15:41:18 +0000 (11:41 -0400)]
Grammar fixups

2 months agoAdd ePUB format (#130)
Luca Palmieri [Tue, 13 Aug 2024 13:53:43 +0000 (15:53 +0200)]
Add ePUB format (#130)

2 months agoAdjust margins for paperback version. Ensure nothing breaches the right margin.
LukeMathWalker [Wed, 7 Aug 2024 13:39:35 +0000 (15:39 +0200)]
Adjust margins for paperback version. Ensure nothing breaches the right margin.

2 months agoredirects -> _redirects
LukeMathWalker [Tue, 6 Aug 2024 15:34:08 +0000 (17:34 +0200)]
redirects -> _redirects

2 months agoAdd print-ready PDF (#127)
Luca Palmieri [Tue, 6 Aug 2024 15:09:04 +0000 (17:09 +0200)]
Add print-ready PDF (#127)

2 months agoAdd formats.
LukeMathWalker [Tue, 6 Aug 2024 08:31:06 +0000 (10:31 +0200)]
Add formats.

2 months agoFix reference to supertrait syntax in 09_error_trait.md (#124)
mckzm [Mon, 5 Aug 2024 15:53:07 +0000 (00:53 +0900)]
Fix reference to supertrait syntax in 09_error_trait.md (#124)

The [Error trait](https://rust-exercises.com/100-exercises/05_ticket_v2/09_error_trait.html?highlight=supertrait#the-error-trait) chapter states that the reader may recall the supertrait syntax from the [Sized trait](https://rust-exercises.com/100-exercises/04_traits/08_sized) chapter. Actually the syntax is introduced in the [From and Into](https://rust-exercises.com/100-exercises/04_traits/09_from) chapter instead. This PR amends the text accordingly.

2 months agoRender the book in PDF using `pandoc` and LaTeX. (#126)
Luca Palmieri [Mon, 5 Aug 2024 15:52:15 +0000 (17:52 +0200)]
Render the book in PDF using `pandoc` and LaTeX. (#126)

* Render the book in PDF using `pandoc` and LaTeX.

* Fix installs.

* Go the apt-get route

* Another attempt

* Avoid installing twice.

* Re-order.

* Add more packages.

* Minimise deps. Fix link checker.

* Missing package.

* Missing package.

* Missing package.

* More packages.

* Missing package.

* Missing package.

* More packages...

* Remove.

* Fix link checker.

* Fix link checker.

* Fix path.

* Add subtitle.

* Avoid running over the right margin.

* Avoid running over the right margin.

* Formatting

2 months agoFix minor typo in 09_bounded.md (#125)
mckzm [Mon, 5 Aug 2024 13:03:31 +0000 (22:03 +0900)]
Fix minor typo in 09_bounded.md (#125)

Trim errant `s` from `enqueue`'s end in [Bounded vs unbounded channels](https://rust-exercises.com/100-exercises/07_threads/09_bounded.html):

`if the producers enqueues messages` -> `if the producers enqueue messages`

2 months agoFormatting
LukeMathWalker [Thu, 1 Aug 2024 13:33:23 +0000 (15:33 +0200)]
Formatting

2 months agoChange exercise for mutable slices. Closes #26
LukeMathWalker [Thu, 1 Aug 2024 13:33:13 +0000 (15:33 +0200)]
Change exercise for mutable slices. Closes #26

2 months agoEnsure that overflow checks are active for the `copy` exercise. Closes #64
LukeMathWalker [Thu, 1 Aug 2024 13:14:10 +0000 (15:14 +0200)]
Ensure that overflow checks are active for the `copy` exercise. Closes #64

2 months agoIt's enough for one field to be private. Closes #69
LukeMathWalker [Thu, 1 Aug 2024 13:10:50 +0000 (15:10 +0200)]
It's enough for one field to be private. Closes #69

2 months agoFormatting
LukeMathWalker [Thu, 1 Aug 2024 13:09:40 +0000 (15:09 +0200)]
Formatting

2 months agoRemove reference to `cargo new` to avoid confusion. Closes #71.
LukeMathWalker [Thu, 1 Aug 2024 13:09:24 +0000 (15:09 +0200)]
Remove reference to `cargo new` to avoid confusion. Closes #71.

2 months agoAdd `cargo-modules`. Closes #101
LukeMathWalker [Thu, 1 Aug 2024 12:56:43 +0000 (14:56 +0200)]
Add `cargo-modules`. Closes #101

2 months agoFix #104
LukeMathWalker [Thu, 1 Aug 2024 12:54:25 +0000 (14:54 +0200)]
Fix #104

2 months agoReword 'static issues. Closes #117
LukeMathWalker [Thu, 1 Aug 2024 12:53:53 +0000 (14:53 +0200)]
Reword 'static issues. Closes #117

2 months agoNo need to deploy anymore.
LukeMathWalker [Tue, 30 Jul 2024 14:13:20 +0000 (16:13 +0200)]
No need to deploy anymore.

3 months agoUpdate 06_async_aware_primitives.md (#122)
code-cp [Sun, 28 Jul 2024 10:46:20 +0000 (18:46 +0800)]
Update 06_async_aware_primitives.md (#122)

Fix a typo

3 months agoFix a typo (#116)
Zhang Zihao [Wed, 17 Jul 2024 06:08:22 +0000 (14:08 +0800)]
Fix a typo (#116)

3 months agoRemove pub visibility on `server()` as the argument has a private type. This gets...
Jack Moffitt [Sun, 7 Jul 2024 19:18:43 +0000 (14:18 -0500)]
Remove pub visibility on `server()` as the argument has a private type. This gets rid of a warning. (#112)

3 months ago07_threads: 03_leak: Leak vector with Vec::leak, not Box::leak (#107)
Evgeniy Filimonov [Sun, 30 Jun 2024 16:23:20 +0000 (18:23 +0200)]
07_threads: 03_leak: Leak vector with Vec::leak, not Box::leak (#107)

3 months agoCh-08 Futures Exercise 02: Fix typo (#106)
Palash Nigam (He/Him) [Sat, 29 Jun 2024 22:18:46 +0000 (03:48 +0530)]
Ch-08 Futures Exercise 02: Fix typo (#106)

4 months agofix(typo): a module name in comments (#102)
LOGI [Thu, 27 Jun 2024 09:35:11 +0000 (17:35 +0800)]
fix(typo): a module name in comments (#102)

The output of the compiler does not include the module name of the `Ticket` struct and the root module of this exercise is `visibility` rather than `encapsulation` which is the root module of the next exercise.

4 months agofix: fix a typo (#103)
Saqib Ahmed [Thu, 27 Jun 2024 09:34:02 +0000 (14:34 +0500)]
fix: fix a typo (#103)

4 months agoUpdate 11_locks.md (#94)
Jerry Wu [Thu, 20 Jun 2024 08:21:53 +0000 (16:21 +0800)]
Update 11_locks.md (#94)

Suggest removing an extra semicolon.

4 months agofix syntax with comma (#89)
Ernie Hershey [Thu, 20 Jun 2024 08:21:33 +0000 (04:21 -0400)]
fix syntax with comma (#89)

Example doesn't compile with a comma here

4 months agoChange test to require impl (#87)
Onè [Thu, 20 Jun 2024 08:21:14 +0000 (04:21 -0400)]
Change test to require impl (#87)

impl std::ops::Add<&SaturatingU16> for SaturatingU16

4 months agoRemove array/slice syntax from argument &mut str in TODO comment for lowercase func...
tomgrbz [Thu, 20 Jun 2024 08:18:55 +0000 (04:18 -0400)]
Remove array/slice syntax from argument &mut str in TODO comment for lowercase func (#99)

Co-authored-by: thomasgrbic <grbic.t@northeastern.edu>
4 months agoFix: typos (#84)
Felix Pherry [Wed, 5 Jun 2024 09:59:04 +0000 (16:59 +0700)]
Fix: typos (#84)

Co-authored-by: Felix Pherry <182051.FELIX@klgroup.local>
4 months agofix(book): Correct type parameter naming convention to pascal case (#79)
Felix Pherry [Sat, 1 Jun 2024 06:31:48 +0000 (13:31 +0700)]
fix(book): Correct type parameter naming convention to pascal case (#79)

* fix(book): Correct type parameter naming convention to pascal case

* Update book/src/04_traits/05_trait_bounds.md

---------

Co-authored-by: Felix Pherry <182051.FELIX@klgroup.local>
Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
5 months agonit: grammar (#70)
rithvik-bosch [Wed, 29 May 2024 08:59:32 +0000 (14:29 +0530)]
nit: grammar (#70)

5 months agoAdd a TODO to make things more explicit.
LukeMathWalker [Tue, 28 May 2024 09:18:27 +0000 (11:18 +0200)]
Add a TODO to make things more explicit.

5 months agoReword.
LukeMathWalker [Tue, 28 May 2024 09:11:41 +0000 (11:11 +0200)]
Reword.

5 months agoBetter example for ownership transfer using String (#68)
Keshav Chakravarthy [Tue, 28 May 2024 09:08:34 +0000 (14:38 +0530)]
Better example for ownership transfer using String (#68)

* Better example for ownership transfer using String

* Update book/src/03_ticket_v1/06_ownership.md

---------

Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
5 months agoGrammar typo (#65)
Ernie Hershey [Tue, 28 May 2024 09:05:59 +0000 (05:05 -0400)]
Grammar typo (#65)

5 months agoChange execution unit name (#60)
Onè [Tue, 28 May 2024 09:05:46 +0000 (05:05 -0400)]
Change execution unit name (#60)

5 months agoUpdate variant name (#58)
Shinya Fujino [Tue, 28 May 2024 09:04:32 +0000 (18:04 +0900)]
Update variant name (#58)

5 months agoFix a typo (#57)
Shinya Fujino [Tue, 28 May 2024 09:04:19 +0000 (18:04 +0900)]
Fix a typo (#57)

5 months agotypos (#55)
Onè [Tue, 28 May 2024 09:04:08 +0000 (05:04 -0400)]
typos (#55)

* Add missing of

* change tense of spawn

* ignored to ignoring

* add need

5 months agoRemove new line.
LukeMathWalker [Fri, 24 May 2024 18:16:31 +0000 (20:16 +0200)]
Remove new line.

5 months agoRe-add necessary references section in 06/06
LukeMathWalker [Fri, 24 May 2024 18:14:02 +0000 (20:14 +0200)]
Re-add necessary references section in 06/06

5 months agoCreate branch first.
LukeMathWalker [Fri, 24 May 2024 16:26:59 +0000 (18:26 +0200)]
Create branch first.

5 months agoFetch history.
LukeMathWalker [Fri, 24 May 2024 16:26:15 +0000 (18:26 +0200)]
Fetch history.

5 months agoFix deploy step.
LukeMathWalker [Fri, 24 May 2024 16:20:45 +0000 (18:20 +0200)]
Fix deploy step.

5 months agoFormatter
LukeMathWalker [Fri, 24 May 2024 16:16:20 +0000 (18:16 +0200)]
Formatter

5 months agoAutomatically add exercise links to sections. (#52)
Luca Palmieri [Fri, 24 May 2024 16:15:38 +0000 (18:15 +0200)]
Automatically add exercise links to sections. (#52)

We use an mdbook preprocessor to automatically generate links to the relevant exercise for each section.
We remove all existing manual links and refactor the deploy process to push the rendered book to a branch.

5 months agoFormatter (#51)
Luca Palmieri [Fri, 24 May 2024 15:00:03 +0000 (17:00 +0200)]
Formatter (#51)

Enforce consistent formatting use `dprint`

5 months agoRun CI on pushes to main too.
LukeMathWalker [Fri, 24 May 2024 14:47:14 +0000 (16:47 +0200)]
Run CI on pushes to main too.

5 months agoAdd CI job to verify that we have no broken links. (#50)
Luca Palmieri [Fri, 24 May 2024 14:45:59 +0000 (16:45 +0200)]
Add CI job to verify that we have no broken links. (#50)

Fix all broken links.

5 months agoadd system to sentence (#48)
Onè [Fri, 24 May 2024 10:58:07 +0000 (06:58 -0400)]
add system to sentence (#48)

5 months agoFix broken links (#47)
Sympatron GmbH [Fri, 24 May 2024 10:57:57 +0000 (12:57 +0200)]
Fix broken links (#47)

5 months agoImprove `Output` explanation.
LukeMathWalker [Fri, 24 May 2024 10:55:58 +0000 (12:55 +0200)]
Improve `Output` explanation.

5 months agoRestructure negative trait bounds section.
LukeMathWalker [Fri, 24 May 2024 10:43:34 +0000 (12:43 +0200)]
Restructure negative trait bounds section.

5 months agoReword instructions.
LukeMathWalker [Fri, 24 May 2024 10:36:15 +0000 (12:36 +0200)]
Reword instructions.

5 months agoAdd trait recommendations.
LukeMathWalker [Fri, 24 May 2024 10:33:35 +0000 (12:33 +0200)]
Add trait recommendations.

5 months agoYou can assign an `if/else` expression to a variable.
LukeMathWalker [Fri, 24 May 2024 10:20:11 +0000 (12:20 +0200)]
You can assign an `if/else` expression to a variable.

5 months agoFix typo.
LukeMathWalker [Fri, 24 May 2024 10:16:04 +0000 (12:16 +0200)]
Fix typo.

5 months agoExplain that generic parameters don't have to be single letters.
LukeMathWalker [Fri, 24 May 2024 10:12:51 +0000 (12:12 +0200)]
Explain that generic parameters don't have to be single letters.

5 months agoAdd missing word (#45)
Onè [Fri, 24 May 2024 08:28:27 +0000 (04:28 -0400)]
Add missing word (#45)

5 months agoUpdate references in `book/src/04_traits` (#46)
Shinya Fujino [Fri, 24 May 2024 08:27:29 +0000 (17:27 +0900)]
Update references in `book/src/04_traits` (#46)

5 months agoFix index.
LukeMathWalker [Thu, 23 May 2024 14:33:55 +0000 (16:33 +0200)]
Fix index.

5 months agoAdd new section on trait bounds.
LukeMathWalker [Thu, 23 May 2024 13:29:42 +0000 (15:29 +0200)]
Add new section on trait bounds.

5 months agoRemove ambiguity in 03/07 exercise mandate.
LukeMathWalker [Thu, 23 May 2024 12:39:43 +0000 (14:39 +0200)]
Remove ambiguity in 03/07 exercise mandate.

5 months agoImprove `as` casting exercise.
LukeMathWalker [Thu, 23 May 2024 12:37:05 +0000 (14:37 +0200)]
Improve `as` casting exercise.

5 months agoreword tuples introduction (#42)
Onè [Thu, 23 May 2024 12:29:55 +0000 (08:29 -0400)]
reword tuples introduction (#42)

5 months agotypos (#41)
Onè [Thu, 23 May 2024 12:29:37 +0000 (08:29 -0400)]
typos (#41)

* that to than

* add missing s

* an to a

Next letter is a consonant sound

5 months agoAlign arrows in diagrams (#39)
Onè [Thu, 23 May 2024 07:05:34 +0000 (03:05 -0400)]
Align arrows in diagrams (#39)

5 months agoChange part of speech for syntax (#40)
Onè [Thu, 23 May 2024 07:05:22 +0000 (03:05 -0400)]
Change part of speech for syntax (#40)

5 months agoremove unused footnote (#38)
Onè [Thu, 23 May 2024 07:04:58 +0000 (03:04 -0400)]
remove unused footnote (#38)

5 months agoUse "bytes" instead of "characters" consistently when talking about length of a ...
LukeMathWalker [Wed, 22 May 2024 10:06:40 +0000 (12:06 +0200)]
Use "bytes" instead of "characters" consistently when talking about length of a `String`.

5 months agoAdd more resources to "Derive" section. Closes #34
LukeMathWalker [Wed, 22 May 2024 10:04:22 +0000 (12:04 +0200)]
Add more resources to "Derive" section. Closes #34

5 months agoFix test to use &mut rather than &. Closes #30
LukeMathWalker [Wed, 22 May 2024 09:11:05 +0000 (11:11 +0200)]
Fix test to use &mut rather than &. Closes #30

5 months agoAdd i32/u32 suffix for numeric literals in 04_traits/01_trait (#20)
Fangyi Zhou [Wed, 22 May 2024 09:04:04 +0000 (10:04 +0100)]
Add i32/u32 suffix for numeric literals in 04_traits/01_trait (#20)

Without an explicit suffix, the compiler is able to use the i32
implementation without the need for an u32 implementation.

5 months agoFix links.
LukeMathWalker [Wed, 22 May 2024 09:03:19 +0000 (11:03 +0200)]
Fix links.

5 months agoCheck status field value after patch (#22)
Jae-Won Chung [Wed, 22 May 2024 09:00:51 +0000 (05:00 -0400)]
Check status field value after patch (#22)

5 months agoUpdate 04_scoped_threads.md (#21)
jw013 [Wed, 22 May 2024 09:00:24 +0000 (05:00 -0400)]
Update 04_scoped_threads.md (#21)

Fix incorrect statement and remove unintended line break.

5 months agoFix a typo in 03_ticket_v1/08_stack (#19)
Fangyi Zhou [Sat, 18 May 2024 15:57:02 +0000 (16:57 +0100)]
Fix a typo in 03_ticket_v1/08_stack (#19)

The type argument of `size_of` is `<u8>` instead of `<String>`.

5 months agomisunderstand the implements verb (#18)
taohua [Sat, 18 May 2024 15:56:39 +0000 (23:56 +0800)]
misunderstand the implements verb (#18)

* Update 08_from.md

* test

* Update exercises/04_traits/08_from/src/lib.rs

---------

Co-authored-by: datewu <hihahajun@gmail.com>
Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
5 months agoFix typo in 05_ticket_v2/09_error_trait/[...] instructions (#13)
Loup Federico [Sat, 18 May 2024 15:54:50 +0000 (17:54 +0200)]
Fix typo in 05_ticket_v2/09_error_trait/[...] instructions (#13)

The commented instructions of the exercise ask to use `No description provided` for the description field when calling `easy_ticket` with an invalid description argument. However, the unit test of that behavior compares the description to `Description not provided` instead.

Previous exercises in that part also use `Description not provided`.

Update the exercise 05_ticket_v2/09_error_trait instructions to use `Description not provided` as an expected default  description value when calling `easy_ticket` with no description instead of `No description provided`.

5 months agofix spelling error (#11)
Thanos [Sat, 18 May 2024 15:54:24 +0000 (18:54 +0300)]
fix spelling error (#11)