From 577f4b9b54d5d61caa5380511c162e1f77dd1018 Mon Sep 17 00:00:00 2001 From: Donghyun Kim Date: Sun, 29 Sep 2024 23:21:01 +0900 Subject: [PATCH 1/3] Write proper shutdown await code --- documentation/docs/frequently-asked-questions.md | 1 + documentation/docs/state-management.md | 2 +- documentation/docs/tutorial.md | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/documentation/docs/frequently-asked-questions.md b/documentation/docs/frequently-asked-questions.md index 53244186..71cdbd59 100644 --- a/documentation/docs/frequently-asked-questions.md +++ b/documentation/docs/frequently-asked-questions.md @@ -252,6 +252,7 @@ pub async fn respond() { #[tokio::main] async fn main() { tokio::spawn(sample_functions::respond()); + rinf::dart_shutdown().await; } ``` diff --git a/documentation/docs/state-management.md b/documentation/docs/state-management.md index fce75887..8a3deef3 100644 --- a/documentation/docs/state-management.md +++ b/documentation/docs/state-management.md @@ -49,11 +49,11 @@ impl Calculator { async fn main() { let mut addr = Calculator::start(); let res = addr.send(Sum(10, 5)).await; - match res { Ok(result) => println!("SUM: {}", result), _ => println!("Communication to the actor has failed"), } + rinf::dart_shutdown().await; } ``` diff --git a/documentation/docs/tutorial.md b/documentation/docs/tutorial.md index b9384706..9e783243 100644 --- a/documentation/docs/tutorial.md +++ b/documentation/docs/tutorial.md @@ -86,6 +86,7 @@ mod tutorial_functions; #[tokio::main] async fn main() { tokio::spawn(tutorial_functions::calculate_precious_data()); + rinf::dart_shutdown().await; } ``` @@ -142,6 +143,7 @@ mod tutorial_functions; #[tokio::main] async fn main() { tokio::spawn(tutorial_functions::stream_amazing_number()); + rinf::dart_shutdown().await; } ``` @@ -231,5 +233,6 @@ mod tutorial_functions; #[tokio::main] async fn main() { tokio::spawn(tutorial_functions::tell_treasure()); + rinf::dart_shutdown().await; } ``` From 1984ef36a1700835ab16667b7861a888c9154e14 Mon Sep 17 00:00:00 2001 From: Donghyun Kim Date: Sun, 29 Sep 2024 23:23:06 +0900 Subject: [PATCH 2/3] Fix the homepage title behavior --- documentation/overrides/home.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/documentation/overrides/home.html b/documentation/overrides/home.html index 29bf45eb..36de97a0 100644 --- a/documentation/overrides/home.html +++ b/documentation/overrides/home.html @@ -1,6 +1,11 @@ {% extends "base.html" %} +{% block htmltitle %} +Rinf +{% endblock %} + + {% block tabs %}