Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 37 additions & 36 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<!-- Keep first page as index.md to avoid giving it two names. -->
[Welcome to Comprehensive Rust 🦀](index.md)
- [Running the Course](running-the-course.md)
Expand Down Expand Up @@ -83,7 +84,7 @@
- [Generic Functions](generics/generic-functions.md)
- [Generic Data types](generics/generic-data.md)
- [Trait Bounds](generics/trait-bounds.md)
- [Impl Trait](generics/impl-trait.md)
- [`impl Trait`](generics/impl-trait.md)
- [Exercise: Generic `min`](generics/exercise.md)
- [Solution](generics/solution.md)

Expand All @@ -93,19 +94,19 @@
- [Standard Library Types](std-types.md)
- [Standard Library](std-types/std.md)
- [Language Docs](std-types/docs.md)
- [Option](std-types/option.md)
- [Result](std-types/result.md)
- [String](std-types/string.md)
- [Vec](std-types/vec.md)
- [HashMap](std-types/hashmap.md)
- [`Option`](std-types/option.md)
- [`Result`](std-types/result.md)
- [`String`](std-types/string.md)
- [`Vec`](std-types/vec.md)
- [`HashMap`](std-types/hashmap.md)
- [Exercise: Counter](std-types/exercise.md)
- [Solution](std-types/solution.md)
- [Standard Library Traits](std-traits.md)
- [Comparisons](std-traits/comparisons.md)
- [Operators](std-traits/operators.md)
- [From and Into](std-traits/from-and-into.md)
- [`From` and `Into`](std-traits/from-and-into.md)
- [Casting](std-traits/casting.md)
- [Read and Write](std-traits/read-and-write.md)
- [`Read` and `Write`](std-traits/read-and-write.md)
- [`Default`, struct update syntax](std-traits/default.md)
- [Closures](std-traits/closures.md)
- [Exercise: ROT13](std-traits/exercise.md)
Expand All @@ -121,14 +122,14 @@
- [Approaches to Memory Management](memory-management/approaches.md)
- [Ownership](memory-management/ownership.md)
- [Move semantics](memory-management/move.md)
- [Clone](memory-management/clone.md)
- [`Clone`](memory-management/clone.md)
- [Copy Types](memory-management/copy-types.md)
- [Drop](memory-management/drop.md)
- [`Drop`](memory-management/drop.md)
- [Exercise: Builder Type](memory-management/exercise.md)
- [Solution](memory-management/solution.md)
- [Smart Pointers](smart-pointers.md)
- [Box<T>](smart-pointers/box.md)
- [Rc](smart-pointers/rc.md)
- [`Box<T>`](smart-pointers/box.md)
- [`Rc`](smart-pointers/rc.md)
- [Exercise: Binary Tree](smart-pointers/exercise.md)
- [Solution](smart-pointers/solution.md)

Expand Down Expand Up @@ -156,16 +157,16 @@

- [Welcome](welcome-day-4.md)
- [Iterators](iterators.md)
- [Iterators](iterators/iterators.md)
- [IntoIterator](iterators/intoiterator.md)
- [FromIterator](iterators/fromiterator.md)
- [`Iterator`](iterators/iterator.md)
- [`IntoIterator`](iterators/intoiterator.md)
- [`FromIterator`](iterators/fromiterator.md)
- [Exercise: Iterator Method Chaining](iterators/exercise.md)
- [Solution](iterators/solution.md)
- [Modules](modules.md)
- [Modules](modules/modules.md)
- [Filesystem Hierarchy](modules/filesystem.md)
- [Visibility](modules/visibility.md)
- [use, super, self](modules/paths.md)
- [`use`, `super`, `self`](modules/paths.md)
- [Exercise: Modules for the GUI Library](modules/exercise.md)
- [Solution](modules/solution.md)
- [Testing](testing.md)
Expand All @@ -185,9 +186,9 @@
- [Panics](error-handling/panics.md)
- [Try operator](error-handling/try.md)
- [Try Conversions](error-handling/try-conversions.md)
- [Error Trait](error-handling/error.md)
- [thiserror and anyhow](error-handling/thiserror-and-anyhow.md)
- [Exercise: Rewriting with Result](error-handling/exercise.md)
- [`Error` Trait](error-handling/error.md)
- [`thiserror` and `anyhow`](error-handling/thiserror-and-anyhow.md)
- [Exercise: Rewriting with `Result`](error-handling/exercise.md)
- [Solution](error-handling/solution.md)
- [Unsafe Rust](unsafe-rust.md)
- [Unsafe](unsafe-rust/unsafe.md)
Expand Down Expand Up @@ -278,17 +279,17 @@
----

- [Welcome](bare-metal.md)
- [no_std](bare-metal/no_std.md)
- [`no_std`](bare-metal/no_std.md)
- [A Minimal Example](bare-metal/minimal.md)
- [alloc](bare-metal/alloc.md)
- [`alloc`](bare-metal/alloc.md)
- [Microcontrollers](bare-metal/microcontrollers.md)
- [Raw MMIO](bare-metal/microcontrollers/mmio.md)
- [PACs](bare-metal/microcontrollers/pacs.md)
- [HAL Crates](bare-metal/microcontrollers/hals.md)
- [Board Support Crates](bare-metal/microcontrollers/board-support.md)
- [The Type State Pattern](bare-metal/microcontrollers/type-state.md)
- [embedded-hal](bare-metal/microcontrollers/embedded-hal.md)
- [probe-rs, cargo-embed](bare-metal/microcontrollers/probe-rs.md)
- [`embedded-hal`](bare-metal/microcontrollers/embedded-hal.md)
- [`probe-rs` and `cargo-embed`](bare-metal/microcontrollers/probe-rs.md)
- [Debugging](bare-metal/microcontrollers/debugging.md)
- [Other Projects](bare-metal/microcontrollers/other-projects.md)
- [Exercises](exercises/bare-metal/morning.md)
Expand All @@ -313,13 +314,13 @@
- [Exceptions](bare-metal/aps/exceptions.md)
- [Other Projects](bare-metal/aps/other-projects.md)
- [Useful Crates](bare-metal/useful-crates.md)
- [zerocopy](bare-metal/useful-crates/zerocopy.md)
- [aarch64-paging](bare-metal/useful-crates/aarch64-paging.md)
- [buddy_system_allocator](bare-metal/useful-crates/buddy_system_allocator.md)
- [tinyvec](bare-metal/useful-crates/tinyvec.md)
- [spin](bare-metal/useful-crates/spin.md)
- [`zerocopy`](bare-metal/useful-crates/zerocopy.md)
- [`aarch64-paging`](bare-metal/useful-crates/aarch64-paging.md)
- [`buddy_system_allocator`](bare-metal/useful-crates/buddy_system_allocator.md)
- [`tinyvec`](bare-metal/useful-crates/tinyvec.md)
- [`spin`](bare-metal/useful-crates/spin.md)
- [Android](bare-metal/android.md)
- [vmbase](bare-metal/android/vmbase.md)
- [`vmbase`](bare-metal/android/vmbase.md)
- [Exercises](exercises/bare-metal/afternoon.md)
- [RTC Driver](exercises/bare-metal/rtc.md)
- [Solutions](exercises/bare-metal/solutions-afternoon.md)
Expand All @@ -335,13 +336,13 @@
- [Channels](concurrency/channels.md)
- [Unbounded Channels](concurrency/channels/unbounded.md)
- [Bounded Channels](concurrency/channels/bounded.md)
- [Send and Sync](concurrency/send-sync.md)
- [Send](concurrency/send-sync/send.md)
- [Sync](concurrency/send-sync/sync.md)
- [`Send` and `Sync`](concurrency/send-sync.md)
- [`Send`](concurrency/send-sync/send.md)
- [`Sync`](concurrency/send-sync/sync.md)
- [Examples](concurrency/send-sync/examples.md)
- [Shared State](concurrency/shared_state.md)
- [Arc](concurrency/shared_state/arc.md)
- [Mutex](concurrency/shared_state/mutex.md)
- [`Arc`](concurrency/shared_state/arc.md)
- [`Mutex`](concurrency/shared_state/mutex.md)
- [Example](concurrency/shared_state/example.md)
- [Exercises](exercises/concurrency/morning.md)
- [Dining Philosophers](exercises/concurrency/dining-philosophers.md)
Expand All @@ -351,7 +352,7 @@
# Concurrency: Afternoon

- [Async Basics](async.md)
- [async/await](async/async-await.md)
- [`async`/`await`](async/async-await.md)
- [Futures](async/futures.md)
- [Runtimes](async/runtimes.md)
- [Tokio](async/runtimes/tokio.md)
Expand All @@ -362,7 +363,7 @@
- [Select](async/control-flow/select.md)
- [Pitfalls](async/pitfalls.md)
- [Blocking the Executor](async/pitfalls/blocking-executor.md)
- [Pin](async/pitfalls/pin.md)
- [`Pin`](async/pitfalls/pin.md)
- [Async Traits](async/pitfalls/async-traits.md)
- [Cancellation](async/pitfalls/cancellation.md)
- [Exercises](exercises/concurrency/afternoon.md)
Expand Down
4 changes: 2 additions & 2 deletions src/async/pitfalls/pin.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Pin
# `Pin`

When you await a future, all local variables (that would ordinarily be stored on
a stack frame) are instead stored in the Future for the current async block. If your
future has pointers to data on the stack, those pointers might get invalidated.
This is unsafe.

Therefore, you must guarantee that the addresses your future points to don't
change. That is why we need to `pin` futures. Using the same future repeatedly
change. That is why we need to "pin" futures. Using the same future repeatedly
in a `select!` often leads to issues with pinned values.

```rust,editable,compile_fail
Expand Down
2 changes: 1 addition & 1 deletion src/bare-metal/microcontrollers/probe-rs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `probe-rs`, `cargo-embed`
# `probe-rs` and `cargo-embed`

[probe-rs](https://probe.rs/) is a handy toolset for embedded debugging, like OpenOCD but better
integrated.
Expand Down
2 changes: 1 addition & 1 deletion src/iterators/iterators.md → src/iterators/iterator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ minutes: 5
<!-- NOTES:
The Iterator trait and basic usage
-->
# Iterators
# `Iterator`

The [`Iterator`][1] trait supports iterating over values in a collection. It
requires a `next` method and provides lots of methods. Many standard library types
Expand Down