From 971288868b54916bc8cdcf7c4dc3686745df3757 Mon Sep 17 00:00:00 2001 From: Carl Fredrik Samson Date: Sun, 5 Apr 2020 00:07:14 +0200 Subject: [PATCH] formatting --- book/0_background_information.html | 14 ++++++++++---- book/1_futures_in_rust.html | 6 +----- book/print.html | 20 +++++++++++--------- book/searchindex.js | 2 +- book/searchindex.json | 2 +- src/0_background_information.md | 13 ++++++++++--- src/1_futures_in_rust.md | 8 +------- 7 files changed, 35 insertions(+), 30 deletions(-) diff --git a/book/0_background_information.html b/book/0_background_information.html index 45b4ae7..e319662 100644 --- a/book/0_background_information.html +++ b/book/0_background_information.html @@ -488,9 +488,12 @@ difficult to understand. If I hadn't written it myself I would probably feel the same. You can always go back and read the book which explains it later.

Callback based approaches

You probably already know what we're going to talk about in the next paragraphs -from Javascript which I assume most know. If your exposure to Javascript has -given you any sorts of PTSD earlier in life, close your eyes now and scroll down -for 2-3 seconds. You'll find a link there that takes you to safety.

+from Javascript which I assume most know.

+
+

If your exposure to Javascript has given you any sorts of PTSD earlier in life, +close your eyes now and scroll down for 2-3 seconds. You'll find a link there +that takes you to safety.

+

The whole idea behind a callback based approach is to save a pointer to a set of instructions we want to run later. We can save that pointer on the stack before we yield control to the runtime, or in some sort of collection as we do below.

@@ -647,7 +650,10 @@ promises are eagerly evaluated. That means that once it's created, it s running a task. Rusts Futures on the other hand is lazily evaluated. They need to be polled once before they do any work. You'll see in a moment.

- +
+
+PANIC BUTTON (next chapter) +