From 0973e600566baa0071cfd050bdfbf62a3e72b43e Mon Sep 17 00:00:00 2001 From: delet0r Date: Mon, 26 Nov 2018 16:43:42 +0100 Subject: [PATCH 1/2] Created sub READMEs for CLI only version Sub READMEs contain the relevant resources from the main README of the web version. All second edition Rust Book links were updated to the 2018 edition. Fixed to typos in main README.md. --- README.md | 8 ++++---- exercises/error_handling/README.md | 5 +++++ exercises/functions/REAMDE.md | 1 + exercises/if/REAMDE.md | 1 + exercises/macros/README.md | 2 ++ exercises/modules/README.md | 1 + exercises/move_semantics/README.md | 7 +++++++ exercises/primitive_types/README.md | 0 exercises/standard_library_types/README.md | 1 + exercises/strings/REAMDE.md | 0 exercises/tests/README.md | 3 +++ exercises/threads/README.md | 1 + exercises/variables/README.md | 0 13 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 exercises/error_handling/README.md create mode 100644 exercises/functions/REAMDE.md create mode 100644 exercises/if/REAMDE.md create mode 100644 exercises/macros/README.md create mode 100644 exercises/modules/README.md create mode 100644 exercises/move_semantics/README.md create mode 100644 exercises/primitive_types/README.md create mode 100644 exercises/standard_library_types/README.md create mode 100644 exercises/strings/REAMDE.md create mode 100644 exercises/tests/README.md create mode 100644 exercises/threads/README.md create mode 100644 exercises/variables/README.md diff --git a/README.md b/README.md index dfd48f6..849848f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # rustlings -Greetings and welcome to rustlings. This project contains small exercises get you used to reading and writing code. This includes reading and responding to compiler messages! +Greetings and welcome to rustlings. This project contains small exercises to get you used to reading and writing code. This includes reading and responding to compiler messages! ## How to get started To use rustlings you have to have [rust](https://www.rust-lang.org/) installed on your machine. @@ -13,12 +13,12 @@ by running `cargo install --path ` (NOTE: for rustling to function you have to be in the directory of the repo). ## Doing exercises -The execises are sorted by topic and can be found in the subdirectory `rustlings/exercises/`. For every topic there is an additional README file with some reasources to get you started on the topic. We really recommend, that you have a look at them before you start. +The exercises are sorted by topic and can be found in the subdirectory `rustlings/exercises/`. For every topic there is an additional README file with some resources to get you started on the topic. We really recommend, that you have a look at them before you start. Your task is simple every exercise contains an error you have to solve, in order to make it compile. Running rustlings with the subcommand `verify` will compile every exercise in the recommended order. It will stop at the first exercise that didn't compile and show you the error to be solved. -If you want to run a single erxercise you can use the subcommand `run `. +If you want to run a single exercise, you can use the subcommand `run `. -When you struggle to solve the error, there is usually a tip at the bottom of the each exercise. \ No newline at end of file +When you struggle to solve the error, there is usually a tip at the bottom of each exercise. \ No newline at end of file diff --git a/exercises/error_handling/README.md b/exercises/error_handling/README.md new file mode 100644 index 0000000..b5895d7 --- /dev/null +++ b/exercises/error_handling/README.md @@ -0,0 +1,5 @@ +For this exercise check out the chapters: +- [Error Handling](https://doc.rust-lang.org/book/second-edition/ch09-02-recoverable-errors-with-result.html) +- [Generics](https://doc.rust-lang.org/book/second-edition/ch10-01-syntax.html) + +of the Rust Book. \ No newline at end of file diff --git a/exercises/functions/REAMDE.md b/exercises/functions/REAMDE.md new file mode 100644 index 0000000..12bbc05 --- /dev/null +++ b/exercises/functions/REAMDE.md @@ -0,0 +1 @@ +For this exercise check out the chapter [Functions](https://doc.rust-lang.org/book/second-edition/ch03-03-how-functions-work.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/if/REAMDE.md b/exercises/if/REAMDE.md new file mode 100644 index 0000000..ce68a43 --- /dev/null +++ b/exercises/if/REAMDE.md @@ -0,0 +1 @@ +For this exercise check out the chapter [If](https://doc.rust-lang.org/book/second-edition/ch03-05-control-flow.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/macros/README.md b/exercises/macros/README.md new file mode 100644 index 0000000..9af0071 --- /dev/null +++ b/exercises/macros/README.md @@ -0,0 +1,2 @@ +For this exercise check out the section [Macros](https://doc.rust-lang.org/book/first-edition/macros.html) and the chapter +[Macros Appendix](https://doc.rust-lang.org/book/2018-edition/appendix-04-macros.html) of the Rust Book and [The Little Book of Rust Macros](https://danielkeep.github.io/tlborm/book/index.html). diff --git a/exercises/modules/README.md b/exercises/modules/README.md new file mode 100644 index 0000000..61edccb --- /dev/null +++ b/exercises/modules/README.md @@ -0,0 +1 @@ +For this exercise check out the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-01-mod-and-the-filesystem.html) chapter of the Rust Book. \ No newline at end of file diff --git a/exercises/move_semantics/README.md b/exercises/move_semantics/README.md new file mode 100644 index 0000000..d9c6c65 --- /dev/null +++ b/exercises/move_semantics/README.md @@ -0,0 +1,7 @@ +These exercises are adapted from [pnkfelix](https://github.com/rustlings/rustlings/blob/master)'s [Rust Tutorial](https://pnkfelix.github.io/rust-examples-icfp2014/) -- Thank you Felix!!! + +For this exercise check out the chapters: +- [Ownership](https://doc.rust-lang.org/book/second-edition/ch04-01-what-is-ownership.html) +- [Reference and borrowing](https://doc.rust-lang.org/book/second-edition/ch04-02-references-and-borrowing.ht) + +of the Rust Book. \ No newline at end of file diff --git a/exercises/primitive_types/README.md b/exercises/primitive_types/README.md new file mode 100644 index 0000000..e69de29 diff --git a/exercises/standard_library_types/README.md b/exercises/standard_library_types/README.md new file mode 100644 index 0000000..ef4ba45 --- /dev/null +++ b/exercises/standard_library_types/README.md @@ -0,0 +1 @@ +For this exercise check out the chapter [Shared-State Concurrency](https://doc.rust-lang.org/book/second-edition/ch16-03-shared-state.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/strings/REAMDE.md b/exercises/strings/REAMDE.md new file mode 100644 index 0000000..e69de29 diff --git a/exercises/tests/README.md b/exercises/tests/README.md new file mode 100644 index 0000000..9919995 --- /dev/null +++ b/exercises/tests/README.md @@ -0,0 +1,3 @@ +Going out of order from the book to cover tests -- many of the following exercises will ask you to make tests pass! + +For this exercise check out the section [How to Write Tests](https://doc.rust-lang.org/book/second-edition/ch11-01-writing-tests.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/threads/README.md b/exercises/threads/README.md new file mode 100644 index 0000000..6e7d789 --- /dev/null +++ b/exercises/threads/README.md @@ -0,0 +1 @@ +For this exercise check out the [Dining Philosophers example](https://doc.rust-lang.org/1.4.0/book/dining-philosophers.html) and the chapter [Concurrency](https://doc.rust-lang.org/book/second-edition/ch16-01-threads.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/variables/README.md b/exercises/variables/README.md new file mode 100644 index 0000000..e69de29 From b0c9b33978ca6ae1eff3658c7c6d0bfe48926d23 Mon Sep 17 00:00:00 2001 From: delet0r Date: Tue, 27 Nov 2018 10:54:01 +0100 Subject: [PATCH 2/2] Changed Rust Book versions in links to 2018 Forgot to add changes to last commit. --- exercises/error_handling/README.md | 6 +++--- exercises/functions/REAMDE.md | 2 +- exercises/if/REAMDE.md | 2 +- exercises/macros/README.md | 2 +- exercises/modules/README.md | 2 +- exercises/move_semantics/README.md | 4 ++-- exercises/primitive_types/README.md | 1 + exercises/standard_library_types/README.md | 6 +++++- exercises/strings/REAMDE.md | 1 + exercises/tests/README.md | 2 +- exercises/threads/README.md | 2 +- exercises/variables/README.md | 1 + 12 files changed, 19 insertions(+), 12 deletions(-) diff --git a/exercises/error_handling/README.md b/exercises/error_handling/README.md index b5895d7..2a53803 100644 --- a/exercises/error_handling/README.md +++ b/exercises/error_handling/README.md @@ -1,5 +1,5 @@ -For this exercise check out the chapters: -- [Error Handling](https://doc.rust-lang.org/book/second-edition/ch09-02-recoverable-errors-with-result.html) -- [Generics](https://doc.rust-lang.org/book/second-edition/ch10-01-syntax.html) +For this exercise check out the sections: +- [Error Handling](https://doc.rust-lang.org/book/2018-edition/ch09-02-recoverable-errors-with-result.html) +- [Generics](https://doc.rust-lang.org/book/2018-edition/ch10-01-syntax.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/functions/REAMDE.md b/exercises/functions/REAMDE.md index 12bbc05..70555a1 100644 --- a/exercises/functions/REAMDE.md +++ b/exercises/functions/REAMDE.md @@ -1 +1 @@ -For this exercise check out the chapter [Functions](https://doc.rust-lang.org/book/second-edition/ch03-03-how-functions-work.html) of the Rust Book. \ No newline at end of file +For this exercise check out the chapter [Functions](https://doc.rust-lang.org/book/2018-edition/ch03-03-how-functions-work.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/if/REAMDE.md b/exercises/if/REAMDE.md index ce68a43..1061462 100644 --- a/exercises/if/REAMDE.md +++ b/exercises/if/REAMDE.md @@ -1 +1 @@ -For this exercise check out the chapter [If](https://doc.rust-lang.org/book/second-edition/ch03-05-control-flow.html) of the Rust Book. \ No newline at end of file +For this exercise check out the chapter [If](https://doc.rust-lang.org/book/2018-edition/ch03-05-control-flow.html?highlight=control,fl#control-flow) of the Rust Book. \ No newline at end of file diff --git a/exercises/macros/README.md b/exercises/macros/README.md index 9af0071..87851c5 100644 --- a/exercises/macros/README.md +++ b/exercises/macros/README.md @@ -1,2 +1,2 @@ -For this exercise check out the section [Macros](https://doc.rust-lang.org/book/first-edition/macros.html) and the chapter +For this exercise check out the section [Macros](https://doc.rust-lang.org/book/2018-edition/macros.html) and the chapter [Macros Appendix](https://doc.rust-lang.org/book/2018-edition/appendix-04-macros.html) of the Rust Book and [The Little Book of Rust Macros](https://danielkeep.github.io/tlborm/book/index.html). diff --git a/exercises/modules/README.md b/exercises/modules/README.md index 61edccb..7a0232f 100644 --- a/exercises/modules/README.md +++ b/exercises/modules/README.md @@ -1 +1 @@ -For this exercise check out the [Modules](https://doc.rust-lang.org/book/second-edition/ch07-01-mod-and-the-filesystem.html) chapter of the Rust Book. \ No newline at end of file +For this exercise check out the [Modules](https://doc.rust-lang.org/book/2018-edition/ch07-01-mod-and-the-filesystem.html) chapter of the Rust Book. \ No newline at end of file diff --git a/exercises/move_semantics/README.md b/exercises/move_semantics/README.md index d9c6c65..c8095bf 100644 --- a/exercises/move_semantics/README.md +++ b/exercises/move_semantics/README.md @@ -1,7 +1,7 @@ These exercises are adapted from [pnkfelix](https://github.com/rustlings/rustlings/blob/master)'s [Rust Tutorial](https://pnkfelix.github.io/rust-examples-icfp2014/) -- Thank you Felix!!! For this exercise check out the chapters: -- [Ownership](https://doc.rust-lang.org/book/second-edition/ch04-01-what-is-ownership.html) -- [Reference and borrowing](https://doc.rust-lang.org/book/second-edition/ch04-02-references-and-borrowing.ht) +- [Ownership](https://doc.rust-lang.org/book/2018-edition/ch04-01-what-is-ownership.html) +- [Reference and borrowing](https://doc.rust-lang.org/book/2018-edition/ch04-02-references-and-borrowing.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/primitive_types/README.md b/exercises/primitive_types/README.md index e69de29..e4f3181 100644 --- a/exercises/primitive_types/README.md +++ b/exercises/primitive_types/README.md @@ -0,0 +1 @@ +For this exercise check out the chapter [Data Types](https://doc.rust-lang.org/book/2018-edition/ch03-02-data-types.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/standard_library_types/README.md b/exercises/standard_library_types/README.md index ef4ba45..46d2ff2 100644 --- a/exercises/standard_library_types/README.md +++ b/exercises/standard_library_types/README.md @@ -1 +1,5 @@ -For this exercise check out the chapter [Shared-State Concurrency](https://doc.rust-lang.org/book/second-edition/ch16-03-shared-state.html) of the Rust Book. \ No newline at end of file +For the Arc exercise check out the chapter [Shared-State Concurrency](https://doc.rust-lang.org/book/2018-edition/ch16-03-shared-state.html) of the Rust Book. + +For the Iterator exercise check out the chapters [Iterator](https://doc.rust-lang.org/book/2018-edition/ch13-02-iterators.html) of the Rust Book and the [Iterator documentation](https://doc.rust-lang.org/stable/std/iter/trait.Iterator.htmlj). +Do not adjust your monitors-- iterators 1 and 2 are indeed missing. Iterator 3 is a bit challenging so we're leaving space for some exercises to lead up to it! + diff --git a/exercises/strings/REAMDE.md b/exercises/strings/REAMDE.md index e69de29..76b74d7 100644 --- a/exercises/strings/REAMDE.md +++ b/exercises/strings/REAMDE.md @@ -0,0 +1 @@ +For this exercise check out the chapter [Strings](https://doc.rust-lang.org/book/2018-edition/ch08-02-strings.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/tests/README.md b/exercises/tests/README.md index 9919995..8683ba8 100644 --- a/exercises/tests/README.md +++ b/exercises/tests/README.md @@ -1,3 +1,3 @@ Going out of order from the book to cover tests -- many of the following exercises will ask you to make tests pass! -For this exercise check out the section [How to Write Tests](https://doc.rust-lang.org/book/second-edition/ch11-01-writing-tests.html) of the Rust Book. \ No newline at end of file +For this exercise check out the section [How to Write Tests](https://doc.rust-lang.org/book/2018-edition/ch11-01-writing-tests.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/threads/README.md b/exercises/threads/README.md index 6e7d789..90581fa 100644 --- a/exercises/threads/README.md +++ b/exercises/threads/README.md @@ -1 +1 @@ -For this exercise check out the [Dining Philosophers example](https://doc.rust-lang.org/1.4.0/book/dining-philosophers.html) and the chapter [Concurrency](https://doc.rust-lang.org/book/second-edition/ch16-01-threads.html) of the Rust Book. \ No newline at end of file +For this exercise check out the [Dining Philosophers example](https://doc.rust-lang.org/1.4.0/book/dining-philosophers.html) and the chapter [Concurrency](https://doc.rust-lang.org/book/2018-edition/ch16-01-threads.html) of the Rust Book. \ No newline at end of file diff --git a/exercises/variables/README.md b/exercises/variables/README.md index e69de29..574c162 100644 --- a/exercises/variables/README.md +++ b/exercises/variables/README.md @@ -0,0 +1 @@ +For this exercise checkout the section [Variables and Mutability](https://doc.rust-lang.org/book/2018-edition/ch03-01-variables-and-mutability.html) of the Rust Book. \ No newline at end of file