diff --git a/book/src/main_event_loop.md b/book/src/main_event_loop.md index 92c4cbfaff63..7eb4ad932367 100644 --- a/book/src/main_event_loop.md +++ b/book/src/main_event_loop.md @@ -169,6 +169,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}} ``` @@ -177,6 +179,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}} ``` @@ -186,10 +190,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}} ```