refactor(rt): remove re-export of tokio::main (#1879)
Closes #1878. BREAKING CHANGE: Replace all usage of `rt::main` with `tokio::main`.
This commit is contained in:
committed by
Sean McArthur
parent
1d00bb29d4
commit
0d3cbe28fc
@@ -12,7 +12,7 @@ use futures_util::TryStreamExt;
|
||||
// A simple type alias so as to DRY.
|
||||
type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
|
||||
|
||||
#[hyper::rt::main]
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let url = "http://jsonplaceholder.typicode.com/users".parse().unwrap();
|
||||
let users = fetch_json(url).await?;
|
||||
|
||||
Reference in New Issue
Block a user