Skip to content

Commit 30dc0ea

Browse files
committed
fix format
1 parent 75a5dc1 commit 30dc0ea

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

syllabus/module/2.1-slides.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ where
231231
## Details - Monomorphization
232232

233233
```rust
234+
234235
trait Move {
235236
fn move_to(&self, x: i32, y: i32);
236237
}
@@ -241,6 +242,7 @@ fn make_move<T: Move>(thing: T, x: i32, y: i32) {
241242

242243
make_move(Snake {}, 1, 1);
243244
make_move(Grasshopper {}, 3, 3);
245+
244246
```
245247

246248
---
@@ -445,22 +447,20 @@ fn concert_ticket_info(ticket: ConcertTicket) {
445447

446448
## Details – Heterogeneous vector
447449

448-
```rust
449-
let airline = Ticket { location: AirlineSeat::FirstClass };
450-
let concert = Ticket { location: ConcertSeat::FrontRow };
451-
ticket_info(airline);
452-
ticket_info(concert);
453-
454-
let tickets = vec![airline, concert];
455-
456-
error[E0308]: mismatched types
457-
--> src/main.rs:89:33
458-
|
459-
89 | let tickets = vec![airline, concert];
460-
| ^^^^^^^ expected enum `AirlineSeat`, found enum `ConcertSeat`
461-
= note: expected type `Ticket<AirlineSeat>`
462-
found struct `Ticket<ConcertSeat>`
463-
```
450+
let airline = Ticket { location: AirlineSeat::FirstClass };
451+
let concert = Ticket { location: ConcertSeat::FrontRow };
452+
ticket_info(airline);
453+
ticket_info(concert);
454+
455+
let tickets = vec![airline, concert];
456+
457+
error[E0308]: mismatched types
458+
--> src/main.rs:89:33
459+
|
460+
89 | let tickets = vec![airline, concert];
461+
| ^^^^^^^ expected enum `AirlineSeat`, found enum `ConcertSeat`
462+
= note: expected type `Ticket<AirlineSeat>`
463+
found struct `Ticket<ConcertSeat>`
464464

465465
---
466466

syllabus/module/2.4-slides.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ match nums.as_slice() {
6464
}
6565
```
6666

67+
---
68+
6769
## Typestates Patterns
6870

6971
- Leverage type system to encode state changes

0 commit comments

Comments
 (0)