Compare commits

...

7 Commits

Author SHA1 Message Date
Ernie Hershey
45c5e390c0 Grammar typo (#7) 2024-05-17 16:59:04 +02:00
Wojtek Porczyk
fe189a64e4 10_as_casting.md: fix 256 bit representation (#6) 2024-05-17 16:58:50 +02:00
Luca Palmieri
ee055245e5 Merge pull request #3 from phmx/patch-1
Fix a nano-typo in 04_panics.md
2024-05-17 13:29:53 +02:00
Luca Palmieri
a8ba7ddec6 Merge pull request #4 from vrnvu/main
fixes usage valid_description typo
2024-05-17 13:29:30 +02:00
Arnau Diaz
d9b6b493e8 fixes usage valid_description 2024-05-17 11:46:20 +02:00
LukeMathWalker
7d1d90fb37 Reword MutexGuard explanation. 2024-05-17 11:19:57 +02:00
Maxim Philippov
69e7b28097 Fix a nano-typo in 04_panics.md 2024-05-17 10:32:16 +02:00
5 changed files with 6 additions and 6 deletions

View File

@@ -38,7 +38,7 @@ fn main() {
}
```
There are other mechanism to work with recoverable errors in Rust, which [we'll cover later](../05_ticket_v2/06_fallibility).
There are other mechanisms to work with recoverable errors in Rust, which [we'll cover later](../05_ticket_v2/06_fallibility).
For the time being we'll stick with panics as a brutal but simple stopgap solution.
## References

View File

@@ -46,7 +46,7 @@ To understand what happens, let's start by looking at how `256u16` is
represented in memory, as a sequence of bits:
```text
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
| | |
+---------------+---------------+
First 8 bits Last 8 bits

View File

@@ -14,7 +14,7 @@ For example: `MutexGuard` is not `Send`, but it is `Sync`.
It isn't `Send` because the lock must be released on the same thread that acquired it, therefore we don't
want `MutexGuard` to be dropped on a different thread.
But it is `Sync`, because that has no impact on where the lock is released.
But it is `Sync`, because giving a `&MutexGuard` to another thread has no impact on where the lock is released.
## `Send` doesn't imply `Sync`

View File

@@ -5,7 +5,7 @@
// explanations.
// There are various ways to write comments in Rust, each with its own purpose.
// For now we'll stick to the most common one: the line comment.
// Everything from `//` to the end of the line is a considered comment.
// Everything from `//` to the end of the line is considered a comment.
// Exercises will include `TODO`, `todo!()` or `__` markers to draw your attention to the lines
// where you need to write code.

View File

@@ -34,7 +34,7 @@ mod tests {
#[test]
#[should_panic(expected = "Title cannot be empty")]
fn title_cannot_be_empty() {
Ticket::new("".into(), valid_title(), "To-Do".into());
Ticket::new("".into(), valid_description(), "To-Do".into());
}
#[test]