diff --git a/book/src/part00.md b/book/src/part00.md index 37bf48588d2a58c5fd4a410c3ffa5b9fe6137604..0a6e56a1d583eb997de42cdf6e3ce1befd33a126 100644 --- a/book/src/part00.md +++ b/book/src/part00.md @@ -114,4 +114,31 @@ println!("{1} {0}", "abc", "def"); Affichera `def abc`. +## Rustlings +Les rustlings à faire dans ce chapitre sont les suivants: + +### Introduction + +```bash +$ rustlings run intro1 +$ rustlings run intro2 +``` + +### Les variables + +```bash +$ rustlings run variables1 +$ rustlings run variables2 +$ rustlings run variables3 +$ rustlings run variables4 +$ rustlings run variables5 +``` + +### Les types primitifs + +```bash +$ rustlings run primitive_types1 +$ rustlings run primitive_types2 +$ rustlings run primitive_types3 +``` \ No newline at end of file diff --git a/book/src/part01.md b/book/src/part01.md index ca4c6af53b0f0fe6cfb18c4b7aa1afbeb79aa805..2232f89e1fa203a689891e5c0d9c46ab883b27c7 100644 --- a/book/src/part01.md +++ b/book/src/part01.md @@ -253,3 +253,32 @@ fn main() { println!("The minimal value is: {min}"); } ``` + + +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### Les `if`s + +```bash +$ rustlings run if1 +$ rustlings run if2 +$ rustlings run if3 +``` + +### Les fonctions + +```bash +$ rustlings run functions1 +$ rustlings run functions2 +$ rustlings run functions3 +$ rustlings run functions4 +$ rustlings run functions5 +``` + +### Quiz + +```bash +$ rustlings run quiz1 +``` diff --git a/book/src/part02.md b/book/src/part02.md index d7ecb29e5ffce7578e52b68938247bd9f7629e91..bfcd5108def7f7047e70cdf493ac01ca90555854 100644 --- a/book/src/part02.md +++ b/book/src/part02.md @@ -240,4 +240,25 @@ fn main() { let nothing = NumberOrNothing::Nothing; NumberOrNothing::print(nothing); } -``` \ No newline at end of file +``` + + +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### Les types énumérés + +```bash +$ rustlings run enums1 +$ rustlings run enums2 +$ rustlings run enums3 +``` + +### La structures + +```bash +$ rustlings run structs1 +$ rustlings run structs2 +$ rustlings run structs3 +``` diff --git a/book/src/part03.md b/book/src/part03.md index 2056a3923eb78ca1daaf1e25539dd69a5a745d3f..699fbf00135c160d2dad49552336c96a744b3500 100644 --- a/book/src/part03.md +++ b/book/src/part03.md @@ -273,3 +273,25 @@ impl Clone for MyStruct { ```rust {{#rustdoc_include ../../codes/rust_lang/part03/src/main.rs:main}} ``` + + +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### Les traits + +```bash +$ rustlings run traits1 +$ rustlings run traits2 +$ rustlings run traits3 +$ rustlings run traits4 +$ rustlings run traits5 +``` + +### Les tuples + +```bash +$ rustlings run primitive_types5 +$ rustlings run primitive_types6 +``` \ No newline at end of file diff --git a/book/src/part04.md b/book/src/part04.md index 127f0c23534ed1f7158fde02b644fa46bca5613b..2dbef99547abfc1c9a73c153804cc4838bef2c07 100644 --- a/book/src/part04.md +++ b/book/src/part04.md @@ -189,3 +189,17 @@ le vérificateur de type du Rust ne laisse pas passer ce genre de choses. {{#rustdoc_include ../../codes/rust_lang/part04/src/main.rs:main}} ``` +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### La `move semantic` + +```bash +$ rustlings run move_semantics1 +$ rustlings run move_semantics2 +$ rustlings run move_semantics3 +$ rustlings run move_semantics4 +$ rustlings run move_semantics5 +$ rustlings run move_semantics6 +``` \ No newline at end of file diff --git a/book/src/part05.md b/book/src/part05.md index ee24553769a408f7aed0adc3b3e802e820ad11c5..a263da74517e93edc81d5f0d2d373cd14a4a984f 100644 --- a/book/src/part05.md +++ b/book/src/part05.md @@ -199,3 +199,16 @@ struct Point { pub y: f32, } ``` + +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### Les modules + +```bash +$ rustlings run modules1 +$ rustlings run modules2 +$ rustlings run modules3 +``` + diff --git a/book/src/part06.md b/book/src/part06.md index 7484bc254a9827df012f36c12d10bee7c1bdf33d..bedbf63260bddd9043975827f0b8e89dd04bc46b 100644 --- a/book/src/part06.md +++ b/book/src/part06.md @@ -303,3 +303,24 @@ et en général d'éviter certaines mauvaises pratiques et/ou de simplifier le code avec des *patterns* connus. Comme ci-dessus, prenez ce code et exécutez la commande `cargo clippy` pour voir les recommandations du linter. + +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### Les modules + +```bash +$ rustlings run tests1 +$ rustlings run tests2 +$ rustlings run tests3 +$ rustlings run tests4 +``` + +### Clippy + +```bash +$ rustlings run clippy1 +$ rustlings run clippy2 +$ rustlings run clippy3 +``` diff --git a/book/src/part07.md b/book/src/part07.md index e005278c9d48bdde62c2e81e551b6e0cfa4db58e..202984ee969e94834c5c3e99373436035e2e5949 100644 --- a/book/src/part07.md +++ b/book/src/part07.md @@ -388,4 +388,28 @@ Avec l'opérateur `?` on peut simplement remplacer le test ainsi : Ces deux fonctions font strictement la même chose. L'opérateur agit comme un sucre syntaxique qui permet d'allèger l'écriture du code et ainsi augmenter sa lisibilité. En clair, si le résultat est `Ok(val)`, l'expression retourne `val`, sinon la fonction se termine ici et retourne le résultat `Err(error)` contenu -dans le résultat. \ No newline at end of file +dans le résultat. + + +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### La gestion des erreurs + +```bash +$ rustlings run errors1 +$ rustlings run errors2 +$ rustlings run errors3 +$ rustlings run errors4 +$ rustlings run errors5 +$ rustlings run errors6 +``` + +### Les options + +```bash +$ rustlings run options1 +$ rustlings run options2 +$ rustlings run options3 +``` diff --git a/book/src/part12.md b/book/src/part12.md index 42c0473b1e37fce2c412bd271e471a4a57f18105..77714ed136fb2e1d44836522a61d48d8493b68c0 100644 --- a/book/src/part12.md +++ b/book/src/part12.md @@ -538,3 +538,13 @@ Dans un ordre aléatoire: * Ajoutez une fonction `remove(i)` permettant d'enlever le `i`-ème élément de la liste, * Ajoutez une fonction `insert(i, data)` permettant d'ajouter `data` à la `i`-ème place dans la liste, * Ajouter les fonctions permettant d'itérer sur la liste en implémentant les trait `Iter` et `IntoIter`. + +## Rustlings + +Les rustlings à faire dans ce chapitre sont les suivants: + +### Les `Box` + +```bash +$ rustlings run box1 +``` \ No newline at end of file