diff --git a/book/src/main_event_loop.md b/book/src/main_event_loop.md index fadc187645c8..df340291f9c2 100644 --- a/book/src/main_event_loop.md +++ b/book/src/main_event_loop.md @@ -178,6 +178,8 @@ After reference cycles we found the second disadvantage of GTK GObjects: They ar ## Async +Filename: listings/main_event_loop/6/main.rs + ```rust {{#rustdoc_include ../listings/main_event_loop/6/main.rs:callback}} ``` @@ -186,6 +188,8 @@ After reference cycles we found the second disadvantage of GTK GObjects: They ar cargo add ashpd@0.6 --features gtk4 ``` +Filename: listings/main_event_loop/7/main.rs + ```rust {{#rustdoc_include ../listings/main_event_loop/7/main.rs:callback}} ``` @@ -195,10 +199,14 @@ cargo add tokio@1 --features rt-multi-thread cargo add reqwest@0.11 --features rustls-tls --no-default-features ``` +Filename: listings/main_event_loop/8/main.rs + ```rust {{#rustdoc_include ../listings/main_event_loop/8/main.rs:tokio_runtime}} ``` +Filename: listings/main_event_loop/8/main.rs + ```rust {{#rustdoc_include ../listings/main_event_loop/8/main.rs:callback}} ```