Skip to content

Commit

Permalink
Merge pull request #457 from cunarist/polish-docs
Browse files Browse the repository at this point in the history
Polish docs
  • Loading branch information
temeddix authored Sep 29, 2024
2 parents a4fc405 + 6aae0b3 commit 986fee3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions documentation/docs/frequently-asked-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ pub async fn respond() {
#[tokio::main]
async fn main() {
tokio::spawn(sample_functions::respond());
rinf::dart_shutdown().await;
}
```

Expand Down
11 changes: 6 additions & 5 deletions documentation/docs/state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Here’s a basic example using the [`messages`](https://crates.io/crates/message

```rust title="native/hub/src/lib.rs"
use messages::prelude::*;
use rinf::debug_print;

rinf::write_interface!();

Expand Down Expand Up @@ -48,12 +49,12 @@ impl Calculator {
#[tokio::main]
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"),
let result = addr.send(Sum(10, 5)).await;
match result {
Ok(inner) => debug_print!("SUM: {}", inner),
_ => debug_print!("Communication to the actor has failed"),
}
rinf::dart_shutdown().await;
}
```

Expand Down
3 changes: 3 additions & 0 deletions documentation/docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ mod tutorial_functions;
#[tokio::main]
async fn main() {
tokio::spawn(tutorial_functions::calculate_precious_data());
rinf::dart_shutdown().await;
}
```

Expand Down Expand Up @@ -142,6 +143,7 @@ mod tutorial_functions;
#[tokio::main]
async fn main() {
tokio::spawn(tutorial_functions::stream_amazing_number());
rinf::dart_shutdown().await;
}
```

Expand Down Expand Up @@ -231,5 +233,6 @@ mod tutorial_functions;
#[tokio::main]
async fn main() {
tokio::spawn(tutorial_functions::tell_treasure());
rinf::dart_shutdown().await;
}
```
5 changes: 5 additions & 0 deletions documentation/overrides/home.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% extends "base.html" %}
<!-- END OF BLOCK -->

{% block htmltitle %}
<title>Rinf</title>
{% endblock %}
<!-- END OF BLOCK -->

{% block tabs %}
<style>
[data-md-color-scheme="default"] {
Expand Down

0 comments on commit 986fee3

Please sign in to comment.