1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-06 00:13:31 +02:00

Add speaker notes about error examples

This commit is contained in:
Ilya Grigoriev 2023-01-11 18:07:14 -08:00
parent a8fb8ad2b6
commit acdf00ae6e
2 changed files with 18 additions and 0 deletions

View File

@ -49,3 +49,12 @@ fn main() {
println!("username or error: {username:?}");
}
```
<details>
Key points:
* The `username` variable can be either `Ok(string)` or `Err(error)`.
* Use the `fs::write` call to test out the different scenarios: no file, empty file, file with username.
</details>

View File

@ -44,3 +44,12 @@ fn main() {
println!("username or error: {username:?}");
}
```
<details>
Key points:
* The `username` variable can be either `Ok(string)` or `Err(error)`.
* Use the `fs::write` call to test out the different scenarios: no file, empty file, file with username.
</details>