mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-25 00:00:23 +02:00
Remove axum::prelude (#195)
This commit is contained in:
+6
-1
@@ -41,7 +41,12 @@ pub use self::{
|
||||
/// response body type:
|
||||
///
|
||||
/// ```rust
|
||||
/// use axum::{prelude::*, response::IntoResponse};
|
||||
/// use axum::{
|
||||
/// handler::get,
|
||||
/// response::IntoResponse,
|
||||
/// route,
|
||||
/// routing::RoutingDsl
|
||||
/// };
|
||||
/// use http_body::Body;
|
||||
/// use http::{Response, HeaderMap};
|
||||
/// use bytes::Bytes;
|
||||
|
||||
@@ -9,7 +9,12 @@ use std::convert::TryFrom;
|
||||
/// # Example
|
||||
///
|
||||
/// ```rust
|
||||
/// use axum::{prelude::*, response::Redirect};
|
||||
/// use axum::{
|
||||
/// handler::get,
|
||||
/// response::Redirect,
|
||||
/// route,
|
||||
/// routing::RoutingDsl
|
||||
/// };
|
||||
///
|
||||
/// let app = route("/old", get(|| async { Redirect::permanent("/new".parse().unwrap()) }))
|
||||
/// .route("/new", get(|| async { "Hello!" }));
|
||||
|
||||
+5
-1
@@ -3,7 +3,11 @@
|
||||
//! # Example
|
||||
//!
|
||||
//! ```
|
||||
//! use axum::prelude::*;
|
||||
//! use axum::{
|
||||
//! handler::get,
|
||||
//! route,
|
||||
//! routing::RoutingDsl
|
||||
//! };
|
||||
//! use axum::response::sse::{sse, Event, KeepAlive, Sse};
|
||||
//! use std::{time::Duration, convert::Infallible};
|
||||
//! use tokio_stream::StreamExt as _ ;
|
||||
|
||||
Reference in New Issue
Block a user