Skip to content

Commit ce0354c

Browse files
committed
Fix reported issues: hint mismatch, broken diagrams, chapter ordering
- async ch15: Fix exercise 4 hint to say Semaphore instead of mpsc - python ch12: Fix broken Mermaid iterator chain diagram (quote edge labels) - python ch14: Remove unnecessary escaped parens in Mermaid node label - c-cpp ch16: Rename sub-chapter file so it sorts after parent in file listings - c-cpp SUMMARY: Update sub-chapter title to reflect case studies 3-5
1 parent 75d79e9 commit ce0354c

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

async-book/src/ch15-exercises.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ async fn main() {
196196

197197
Implement an async-aware mutex using channels (without using `tokio::sync::Mutex`).
198198

199-
*Hint*: Use a `tokio::sync::mpsc` channel with capacity 1 as a semaphore.
199+
*Hint*: Use a `tokio::sync::Semaphore` with 1 permit to serialize access.
200200

201201
<details>
202202
<summary>🔑 Solution</summary>

c-cpp-book/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
- [15. no_std — Rust Without the Standard Library](ch15-no_std-rust-without-the-standard-library.md)
3636
- [Embedded Deep Dive](ch15-1-embedded-deep-dive.md)
3737
- [16. Case Studies: Real-World C++ to Rust](ch16-case-studies.md)
38-
- [Case Study — Lifetime Borrowing](ch16-1-case-study-lifetime-borrowing.md)
38+
- [Case Studies 3–5: Lifetimes, Composability, Trait Objects](ch16-cases-3-5-lifetime-borrowing.md)
3939

4040
---
4141

File renamed without changes.

python-book/src/ch12-closures-and-iterators.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ flat = [item for sublist in nested for item in sublist]
173173

174174
```mermaid
175175
flowchart LR
176-
A["Source<br/>[1,2,3,4,5]"] -->|.iter\(\)| B["Iterator"]
177-
B -->|.filter\(\|x\| x%2==0\)| C["[2, 4]"]
178-
C -->|.map\(\|x\| x*x\)| D["[4, 16]"]
179-
D -->|.collect\(\)| E["Vec&lt;i32&gt;<br/>[4, 16]"]
176+
A["Source<br/>[1,2,3,4,5]"] -->|".iter()"| B["Iterator"]
177+
B -->|".filter(x: x%2==0)"| C["[2, 4]"]
178+
C -->|".map(x: x*x)"| D["[4, 16]"]
179+
D -->|".collect()"| E["Vec&lt;i32&gt;<br/>[4, 16]"]
180180
style A fill:#ffeeba
181181
style E fill:#d4edda
182182
```

python-book/src/ch14-unsafe-rust-and-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Python never gives you direct memory access.
1313
flowchart TB
1414
subgraph Safe ["Safe Rust (99% of code)"]
1515
S1["Your application logic"]
16-
S2["pub fn safe_api\(&self\) -> Result"]
16+
S2["pub fn safe_api(&self) -> Result"]
1717
end
1818
subgraph Unsafe ["unsafe block (minimal, audited)"]
1919
U1["Raw pointer dereference"]

0 commit comments

Comments
 (0)