You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am new to rust so I am sorry in advance if this issue is my fault.
I was trying to use an example from docs, and I got the following error.
thread 'main' panicked at 'not currently running on the Tokio runtime.'
I did my research and I found out that probably roux expect tokio runtime but when I wrapped the main function with #[tokio::main] I am still getting the same error.
Whole code
use roux::Subreddit;use tokio;#[tokio::main]asyncfnmain(){let subreddit = Subreddit::new("rust");let rising = subreddit.rising(30,None).await;println!("{:?}", rising)}
There seems to be some sort of issue with the latest Tokio version (0.3) which is a beta release. Judging by the changelog, they made some changes to the runtime API: tokio-rs/tokio#2876 so I think it might be a bug.
Anyway, I suggest to just downgrade to v0.2.22 as I can verify that it worked for me. Let me know how that goes.
Hi, I am new to rust so I am sorry in advance if this issue is my fault.
I was trying to use an example from docs, and I got the following error.
I did my research and I found out that probably roux expect tokio runtime but when I wrapped the main function with #[tokio::main] I am still getting the same error.
Whole code
Code above is a shortened version of Basic Usage
Environment
Thanks in advance for any suggestion or solution <3 Have a nice day :)
The text was updated successfully, but these errors were encountered: