Skip to content

Commit

Permalink
Re-apply formatting to SUMMARY.md
Browse files Browse the repository at this point in the history
With the latest version of mdbook-i18n-helpers, we now have support
for formatting in the `SUMMARY.md` file. This allows us to revert the
changes made in #130 when we first introduced the translation support.

This also aligns a few headings to match the heading in the outline.
While this isn’t strictly necessary, it removes a bit of work for the
translators.
  • Loading branch information
mgeisler committed Oct 25, 2023
1 parent e6e4d50 commit a21a6b8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 44 deletions.
82 changes: 41 additions & 41 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,37 @@
- [References](basic-syntax/references.md)
- [Dangling References](basic-syntax/references-dangling.md)
- [Slices](basic-syntax/slices.md)
- [String vs str](basic-syntax/string-slices.md)
- [`String` vs `str`](basic-syntax/string-slices.md)
- [Functions](basic-syntax/functions.md)
- [Rustdoc](basic-syntax/rustdoc.md)
- [Methods](basic-syntax/methods.md)
- [Overloading](basic-syntax/functions-interlude.md)
- [Exercises](exercises/day-1/morning.md)
- [Implicit Conversions](exercises/day-1/implicit-conversions.md)
- [Arrays and for Loops](exercises/day-1/for-loops.md)
- [Arrays and `for` Loops](exercises/day-1/for-loops.md)

# Day 1: Afternoon

- [Control Flow](control-flow.md)
- [Blocks](control-flow/blocks.md)
- [if expressions](control-flow/if-expressions.md)
- [for expressions](control-flow/for-expressions.md)
- [while expressions](control-flow/while-expressions.md)
- [break & continue](control-flow/break-continue.md)
- [loop expressions](control-flow/loop-expressions.md)
- [`if` expressions](control-flow/if-expressions.md)
- [`for` expressions](control-flow/for-expressions.md)
- [`while` expressions](control-flow/while-expressions.md)
- [`break` & `continue`](control-flow/break-continue.md)
- [`loop` expressions](control-flow/loop-expressions.md)

- [Variables](basic-syntax/variables.md)
- [Type Inference](basic-syntax/type-inference.md)
- [static & const](basic-syntax/static-and-const.md)
- [`static` & `const`](basic-syntax/static-and-const.md)
- [Scopes and Shadowing](basic-syntax/scopes-shadowing.md)
- [Enums](enums.md)
- [Variant Payloads](enums/variant-payloads.md)
- [Enum Sizes](enums/sizes.md)

- [Novel Control Flow](control-flow/novel.md)
- [if let expressions](control-flow/if-let-expressions.md)
- [while let expressions](control-flow/while-let-expressions.md)
- [match expressions](control-flow/match-expressions.md)
- [`if let` expressions](control-flow/if-let-expressions.md)
- [`while let` expressions](control-flow/while-let-expressions.md)
- [`match` expressions](control-flow/match-expressions.md)

- [Pattern Matching](pattern-matching.md)
- [Destructuring Enums](pattern-matching/destructuring-enums.md)
Expand Down Expand Up @@ -110,15 +110,15 @@
# Day 2: Afternoon

- [Standard Library](std.md)
- [Option and Result](std/option-result.md)
- [String](std/string.md)
- [Vec](std/vec.md)
- [HashMap](std/hashmap.md)
- [Box](std/box.md)
- [`Option` and `Result`](std/option-result.md)
- [`String`](std/string.md)
- [`Vec`](std/vec.md)
- [`HashMap`](std/hashmap.md)
- [`Box`](std/box.md)
- [Recursive Data Types](std/box-recursive.md)
- [Niche Optimization](std/box-niche.md)
- [Rc](std/rc.md)
- [Cell/RefCell](std/cell.md)
- [`Rc`](std/rc.md)
- [`Cell` & `RefCell`](std/cell.md)
- [Modules](modules.md)
- [Visibility](modules/visibility.md)
- [Paths](modules/paths.md)
Expand All @@ -142,16 +142,16 @@
- [Deriving Traits](traits/deriving-traits.md)
- [Default Methods](traits/default-methods.md)
- [Trait Bounds](traits/trait-bounds.md)
- [impl Trait](traits/impl-trait.md)
- [`impl Trait`](traits/impl-trait.md)
- [Important Traits](traits/important-traits.md)
- [Iterator](traits/iterator.md)
- [FromIterator](traits/from-iterator.md)
- [From and Into](traits/from-into.md)
- [Read and Write](traits/read-write.md)
- [Drop](traits/drop.md)
- [Default](traits/default.md)
- [Operators: Add, Mul, ...](traits/operators.md)
- [Closures: Fn, FnMut, FnOnce](traits/closures.md)
- [`Iterator`](traits/iterator.md)
- [`FromIterator`](traits/from-iterator.md)
- [`From` & `Into`](traits/from-into.md)
- [`Read` & `Write`](traits/read-write.md)
- [`Drop`](traits/drop.md)
- [`Default`](traits/default.md)
- [Operators: `Add`, `Mul`, ...](traits/operators.md)
- [Closures: `Fn`, `FnMut`, `FnOnce`](traits/closures.md)
- [Exercises](exercises/day-3/morning.md)
- [A Simple GUI Library](exercises/day-3/simple-gui.md)
- [Points and Polygons](exercises/day-3/points-polygons.md)
Expand All @@ -162,7 +162,7 @@
- [Panics](error-handling/panics.md)
- [Catching Stack Unwinding](error-handling/panic-unwind.md)
- [Structured Error Handling](error-handling/result.md)
- [Propagating Errors with ?](error-handling/try-operator.md)
- [Propagating Errors with `?`](error-handling/try-operator.md)
- [Converting Error Types](error-handling/converting-error-types.md)
- [Example](error-handling/converting-error-types-example.md)
- [Deriving Error Enums](error-handling/deriving-error-enums.md)
Expand Down Expand Up @@ -251,13 +251,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)

Expand All @@ -272,13 +272,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 @@ -287,7 +287,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 @@ -298,7 +298,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/control-flow/break-continue.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `break` and `continue`
# `break` & `continue`

- If you want to exit a loop early, use [`break`](https://doc.rust-lang.org/reference/expressions/loop-expr.html#break-expressions),
- If you want to immediately start
Expand Down

0 comments on commit a21a6b8

Please sign in to comment.