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
@@ -9,10 +9,6 @@
|
||||
pub use std::future::Future;
|
||||
pub use futures_core::Stream;
|
||||
|
||||
use tokio;
|
||||
|
||||
pub use tokio::main;
|
||||
|
||||
use self::inner::Spawn;
|
||||
|
||||
/// Spawns a future on the default executor.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
//! use hyper::service::{make_service_fn, service_fn};
|
||||
//!
|
||||
//! # #[cfg(feature = "runtime")]
|
||||
//! # #[hyper::rt::main]
|
||||
//! # #[tokio::main]
|
||||
//! async fn main() {
|
||||
//! // Construct our SocketAddr to listen on...
|
||||
//! let addr = ([127, 0, 0, 1], 3000).into();
|
||||
@@ -379,7 +379,7 @@ impl<I, E> Builder<I, E> {
|
||||
/// # #[cfg(not(feature = "runtime"))]
|
||||
/// # fn main() {}
|
||||
/// # #[cfg(feature = "runtime")]
|
||||
/// # #[hyper::rt::main]
|
||||
/// # #[tokio::main]
|
||||
/// # async fn main() {
|
||||
/// use hyper::{Body, Error, Response, Server};
|
||||
/// use hyper::service::{make_service_fn, service_fn};
|
||||
|
||||
@@ -120,7 +120,7 @@ where
|
||||
/// ```rust,no_run
|
||||
/// # #![feature(async_await)]
|
||||
/// # #[cfg(feature = "runtime")]
|
||||
/// # #[hyper::rt::main]
|
||||
/// # #[tokio::main]
|
||||
/// # async fn main() {
|
||||
/// use std::net::TcpStream;
|
||||
/// use hyper::{Body, Error, Request, Response, Server};
|
||||
|
||||
Reference in New Issue
Block a user