1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-20 05:09:57 +02:00

Add course and session markers for deep-dives (#1521)

This doesn't add any timing information. The authors of each deep-dive
can do that separately.

Fixes #1510.
This commit is contained in:
Dustin J. Mitchell 2023-11-30 09:26:21 -05:00 committed by GitHub
parent 8862ab6530
commit a73c830e45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 1 deletions

View File

@ -321,6 +321,9 @@ impl Session {
/// Return the total duration of this session.
pub fn minutes(&self) -> u64 {
let instructional_time: u64 = self.into_iter().map(|s| s.minutes()).sum();
if instructional_time == 0 {
return instructional_time;
}
let breaks = (self.into_iter().filter(|s| s.minutes() > 0).count() - 1) as u64
* BREAK_DURATION;
instructional_time + breaks

View File

@ -1,5 +1,6 @@
---
course: none
course: Android
session: Android
---
# Welcome to Rust in Android

View File

@ -1,3 +1,6 @@
---
session: Afternoon
---
# Async Rust
"Async" is a concurrency model where multiple tasks are executed concurrently by

View File

@ -1,3 +1,7 @@
---
course: Bare Metal
session: Morning
---
# Welcome to Bare Metal Rust
This is a standalone one-day course about bare-metal Rust, aimed at people who are familiar with the

View File

@ -1,3 +1,6 @@
---
session: Afternoon
---
# Application processors
So far we've talked about microcontrollers, such as the Arm Cortex-M series. Now let's try writing

View File

@ -1,3 +1,7 @@
---
course: Chromium
session: Chromium
---
# Welcome to Rust in Chromium
Rust is supported for third-party libraries in Chromium, with first-party glue

View File

@ -1,3 +1,7 @@
---
course: Concurrency
session: Morning
---
# Welcome to Concurrency in Rust
Rust has full support for concurrency using OS threads with mutexes and

View File

@ -1,3 +1,6 @@
---
course: none
---
# Thanks!
_Thank you for taking Comprehensive Rust 🦀!_ We hope you enjoyed it and that it