Skip to content

Commit

Permalink
rebase onto @fw-immunant's changes
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Aug 28, 2023
1 parent 9f55d35 commit c66e784
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
16 changes: 9 additions & 7 deletions cr2-organization/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,15 @@ def parse_summary(self):
Slide(
title="If-Let, While-Let, Let-Else",
notes="Presented as shorthands to match expressions",
existing=SUMMARY.ref("control-flow/if-let-expressions.md")
existing=SUMMARY.ref("control-flow/novel.md")
+ SUMMARY.ref("control-flow/if-let-expressions.md")
+ SUMMARY.ref("control-flow/while-let-expressions.md"),
minutes=3,
),
Slide(
title="Exercise: RPN Evaluation",
content=RPN_EXPRESSION_EX,
existing=SUMMARY.ref(""), # Pattern Matching
minutes=15,
),
],
Expand Down Expand Up @@ -559,7 +561,7 @@ def parse_summary(self):
Slide(
title="Exercise: Book Reviews",
notes="Inspired by example from https://doc.rust-lang.org/std/collections/struct.HashMap.html with one bit missing",
existing=SUMMARY.ref("exercises/day-1/book-library.md"),
existing=SUMMARY.ref("exercises/day-2/book-library.md"),
minutes=5,
),
],
Expand Down Expand Up @@ -688,7 +690,7 @@ def parse_summary(self):
title="Iterator Ownership",
minutes=5,
existing=SUMMARY.ref(
"exercises/day-1/iterators-and-ownership.md"
"exercises/day-2/iterators-and-ownership.md"
),
notes="Ownership of iterators and any underlying collection, and the FromIterator trait",
),
Expand Down Expand Up @@ -756,7 +758,7 @@ def parse_summary(self):
Slide(
title="Exercise: Luhn Algorithm",
minutes=15,
existing=SUMMARY.ref("exercises/day-2/luhn.md"),
existing=SUMMARY.ref("exercises/day-1/luhn.md"),
notes="Give all of the test cases, to give students a sense for how nice TDD is in Rust",
),
],
Expand Down Expand Up @@ -863,7 +865,7 @@ def parse_summary(self):
existing=SUMMARY.ref("exercises/day-2/health-statistics.md")
# The points/polygons exercise is largely redundant
# to health-statistics, so redirect it here.
+ SUMMARY.ref("exercises/day-2/points-polygons.md"),
+ SUMMARY.ref("exercises/day-3/points-polygons.md"),
minutes=15,
),
],
Expand Down Expand Up @@ -1000,9 +1002,9 @@ def parse_summary(self):
def main():
unseen = SUMMARY.unseen()
if unseen:
print(f"# ORHPANED CONTENT - content in v1 not seen in v2\n", file=file)
print(f"# ORHPANED CONTENT - content in v1 not seen in v2\n")
for node in sorted(unseen, key=lambda n: n.order):
print(f"* `{node.path}` ({node.title})", file=file)
print(f"* `{node.path}` ({node.title})")
sys.exit(1)

with open("outline.md", "w") as file:
Expand Down
10 changes: 5 additions & 5 deletions cr2-organization/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fill in the collatz function.
* _Existing Content_: pattern-matching/destructuring-structs.md, pattern-matching/destructuring-enums.md

## Day 1 / Structs and Enums - If-Let, While-Let, Let-Else
* _Existing Content_: control-flow/if-let-expressions.md, control-flow/while-let-expressions.md
* _Existing Content_: control-flow/novel.md, control-flow/if-let-expressions.md, control-flow/while-let-expressions.md
* _Notes_: Presented as shorthands to match expressions

## Day 1 / Structs and Enums - Exercise: RPN Evaluation
Expand Down Expand Up @@ -149,7 +149,7 @@ Vec<Input>
* _Existing Content_: std/hashmap.md

## Day 1 / Common Standard Library Types - Exercise: Book Reviews
* _Existing Content_: exercises/day-1/book-library.md
* _Existing Content_: exercises/day-2/book-library.md
* _Notes_: Inspired by example from https://doc.rust-lang.org/std/collections/struct.HashMap.html with one bit missing

## Day 2 / Methods and Traits - Welcome
Expand Down Expand Up @@ -210,7 +210,7 @@ Vec<Input>
* _Notes_: The Iterator trait and basic usage

## Day 2 / Iterators - Iterator Ownership
* _Existing Content_: exercises/day-1/iterators-and-ownership.md
* _Existing Content_: exercises/day-2/iterators-and-ownership.md
* _Notes_: Ownership of iterators and any underlying collection, and the FromIterator trait

## Day 2 / Iterators - FromIterator and collect()
Expand Down Expand Up @@ -242,7 +242,7 @@ Vec<Input>
* _Notes_: Testing in more detail: Integration tests (separate crate with tests), documentation tests, test utilities like googletest, proptest, rstest

## Day 2 / Testing - Exercise: Luhn Algorithm
* _Existing Content_: exercises/day-2/luhn.md
* _Existing Content_: exercises/day-1/luhn.md
* _Notes_: Give all of the test cases, to give students a sense for how nice TDD is in Rust

## Day 3 / Memory Management - Welcome
Expand Down Expand Up @@ -315,7 +315,7 @@ fn main() {
* _Notes_: Introduce the concept, with an example based on Mutex showing an `&self` method doing mutation; reference Cell/RefCell without detail.

## Day 3 / References and Borrowing - Exercise: Health Statistics
* _Existing Content_: exercises/day-2/health-statistics.md, exercises/day-2/points-polygons.md
* _Existing Content_: exercises/day-2/health-statistics.md, exercises/day-3/points-polygons.md

## Day 3 / Slices and Lifetimes - Slices: `&[T]`
* _Existing Content_: basic-syntax/slices.md, basic-syntax/string-slices.md
Expand Down

0 comments on commit c66e784

Please sign in to comment.