Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/tokio/tutorial/hello-tokio.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ The `#[tokio::main]` function is a macro. It transforms the `async fn main()`
into a synchronous `fn main()` that initializes a runtime instance and executes
the async main function.

For example, the following:
For example, the following code:

```rust
#[tokio::main]
Expand All @@ -219,11 +219,11 @@ async fn main() {
}
```

gets transformed into:
is functionally equivalent to:

```rust
fn main() {
let mut rt = tokio::runtime::Runtime::new().unwrap();
let rt = tokio::runtime::Runtime::new().unwrap();
rt.block_on(async {
println!("hello");
})
Expand Down