You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-19 23:45:40 +02:00
Reorder material on first two days (#913)
- Morning of Day 1 still introduces the language and its high-level goals/value proposition, and starts with the built-in data types Rust provides, and how you define a function. - Afternoon of Day 1 gets a front loading of the basic control flow structures in Rust but not the more exotic ones. - The exercises for day 1 afternoon will be the Luhn algorithm (where we can match on digits and enums such as `Option`. - Morning of day 2 still has discussion of memory management. Fixes #510. --------- Co-authored-by: Martin Geisler <mgeisler@google.com>
This commit is contained in:
committed by
GitHub
parent
e55361233e
commit
d3a90373b0
@ -8,30 +8,30 @@ publish = false
|
||||
name = "for-loops"
|
||||
path = "day-1/for-loops.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "book-library"
|
||||
path = "day-1/book-library.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "points-polygons"
|
||||
path = "day-2/points-polygons.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "luhn"
|
||||
path = "day-2/luhn.rs"
|
||||
path = "day-1/luhn.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "book-library"
|
||||
path = "day-2/book-library.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "strings-iterators"
|
||||
path = "day-2/strings-iterators.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "safe-ffi-wrapper"
|
||||
path = "day-3/safe-ffi-wrapper.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "simple-gui"
|
||||
path = "day-3/simple-gui.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "points-polygons"
|
||||
path = "day-3/points-polygons.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "safe-ffi-wrapper"
|
||||
path = "day-3/safe-ffi-wrapper.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "dining-philosophers"
|
||||
path = "concurrency/dining-philosophers.rs"
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
We will look at two things:
|
||||
|
||||
* A small book library,
|
||||
* The Luhn algorithm,
|
||||
|
||||
* Iterators and ownership (hard).
|
||||
* An exercise on pattern matching.
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -1,9 +1,13 @@
|
||||
# Day 1 Afternoon Exercises
|
||||
|
||||
## Designing a Library
|
||||
## Luhn Algorithm
|
||||
|
||||
([back to exercise](book-library.md))
|
||||
([back to exercise](luhn.md))
|
||||
|
||||
```rust
|
||||
{{#include book-library.rs}}
|
||||
{{#include luhn.rs}}
|
||||
```
|
||||
|
||||
## Pattern matching
|
||||
|
||||
TBD.
|
||||
|
@ -1,13 +1,5 @@
|
||||
# Day 2 Afternoon Exercises
|
||||
|
||||
## Luhn Algorithm
|
||||
|
||||
([back to exercise](luhn.md))
|
||||
|
||||
```rust
|
||||
{{#include luhn.rs}}
|
||||
```
|
||||
|
||||
## Strings and Iterators
|
||||
|
||||
([back to exercise](strings-iterators.md))
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Day 2 Morning Exercises
|
||||
|
||||
## Points and Polygons
|
||||
## Designing a Library
|
||||
|
||||
([back to exercise](points-polygons.md))
|
||||
([back to exercise](book-library.md))
|
||||
|
||||
```rust
|
||||
{{#include points-polygons.rs}}
|
||||
{{#include book-library.rs}}
|
||||
```
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Day 3: Morning Exercises
|
||||
|
||||
We will design a classical GUI library traits and trait objects.
|
||||
We will design a classical GUI library using traits and trait objects.
|
||||
|
||||
We will also look at enum dispatch with an exercise involving points and polygons.
|
||||
|
||||
<details>
|
||||
|
||||
|
@ -7,3 +7,11 @@
|
||||
```rust
|
||||
{{#include simple-gui.rs}}
|
||||
```
|
||||
|
||||
## Points and Polygons
|
||||
|
||||
([back to exercise](points-polygons.md))
|
||||
|
||||
```rust
|
||||
{{#include points-polygons.rs}}
|
||||
```
|
||||
|
Reference in New Issue
Block a user