Skip to content

Commit

Permalink
fix: Don't use #[tokio::main] in custom_tokio_rt.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Jul 11, 2024
1 parent 7ee5c43 commit ef35ad2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/custom_tokio_rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ fn main() {
}

#[cfg(feature = "custom-tokio-rt")]
#[tokio::main]
async fn main() {
fn main() {
let rt = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.unwrap();
let _guard = rt.enter();
launch_with_title(|| rsx!(label { "Hello, World!" }), "Custom Tokio Runtime")
}

0 comments on commit ef35ad2

Please sign in to comment.