From f32ee7fbbb53dad954a2e441ad3c136c9dd94536 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 28 Mar 2020 11:47:14 +0100 Subject: [PATCH] Fix collision of reference-styile markdown link It seems like markdown does ignore casing for reference-style links, leading to a collision because both [`wake`] and [`Wake`] are defined. This commit fixes this by using a different name for the second link reference. --- blog/content/second-edition/posts/12-async-await/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog/content/second-edition/posts/12-async-await/index.md b/blog/content/second-edition/posts/12-async-await/index.md index c34525d4..a48a5df8 100644 --- a/blog/content/second-edition/posts/12-async-await/index.md +++ b/blog/content/second-edition/posts/12-async-await/index.md @@ -1598,11 +1598,11 @@ We push the `task_id` to the referenced `wake_queue`. Since modifications of the ##### The `Wake` Trait -In order to use our `TaskWaker` type for polling futures, we need to convert it to a [`Waker`] instance first. This is required because the [`Future::poll`] method takes a [`Context`] instance as argument, which can only be constructed from the `Waker` type. While we could do this by providing an implementation of the [`RawWaker`] type, it's both simpler and safer to instead implement the `Arc`-based [`Wake`] trait and then using the [`From`] implementations provided by the standard library to construct the `Waker`. +In order to use our `TaskWaker` type for polling futures, we need to convert it to a [`Waker`] instance first. This is required because the [`Future::poll`] method takes a [`Context`] instance as argument, which can only be constructed from the `Waker` type. While we could do this by providing an implementation of the [`RawWaker`] type, it's both simpler and safer to instead implement the `Arc`-based [`Wake`][wake-trait] trait and then using the [`From`] implementations provided by the standard library to construct the `Waker`. The trait implementation looks like this: -[`Wake`]: https://doc.rust-lang.org/nightly/alloc/task/trait.Wake.html +[wake-trait]: https://doc.rust-lang.org/nightly/alloc/task/trait.Wake.html ```rust // in src/task/simple_executor.rs