mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
Reduce dependency on futures-util (#3358)
This commit is contained in:
@@ -10,7 +10,7 @@ use axum::{
|
||||
};
|
||||
use axum_core::__composite_rejection as composite_rejection;
|
||||
use axum_core::__define_rejection as define_rejection;
|
||||
use futures_util::stream::Stream;
|
||||
use futures_core::stream::Stream;
|
||||
use http::{
|
||||
header::{HeaderMap, CONTENT_TYPE},
|
||||
Request, StatusCode,
|
||||
|
||||
@@ -7,7 +7,8 @@ use axum::{
|
||||
handler::Handler,
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use futures_util::future::{BoxFuture, FutureExt, Map};
|
||||
use futures_core::future::BoxFuture;
|
||||
use futures_util::future::{FutureExt, Map};
|
||||
use std::{future::Future, marker::PhantomData};
|
||||
|
||||
mod or;
|
||||
|
||||
@@ -5,7 +5,8 @@ use axum::{
|
||||
handler::Handler,
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use futures_util::future::{BoxFuture, Either as EitherFuture, FutureExt, Map};
|
||||
use futures_core::future::BoxFuture;
|
||||
use futures_util::future::{Either as EitherFuture, FutureExt, Map};
|
||||
use std::{future::Future, marker::PhantomData};
|
||||
|
||||
/// [`Handler`] that runs one [`Handler`] and if that rejects it'll fallback to another
|
||||
|
||||
@@ -7,7 +7,8 @@ use axum::{
|
||||
BoxError,
|
||||
};
|
||||
use bytes::{BufMut, BytesMut};
|
||||
use futures_util::stream::{BoxStream, Stream, TryStream, TryStreamExt};
|
||||
use futures_core::{stream::BoxStream, Stream, TryStream};
|
||||
use futures_util::stream::TryStreamExt;
|
||||
use pin_project_lite::pin_project;
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use std::{
|
||||
@@ -44,7 +45,7 @@ pin_project! {
|
||||
/// ```rust
|
||||
/// use axum::{BoxError, response::{IntoResponse, Response}};
|
||||
/// use axum_extra::json_lines::JsonLines;
|
||||
/// use futures_util::stream::Stream;
|
||||
/// use futures_core::stream::Stream;
|
||||
///
|
||||
/// fn stream_of_values() -> impl Stream<Item = Result<serde_json::Value, BoxError>> {
|
||||
/// # futures_util::stream::empty()
|
||||
|
||||
@@ -4,7 +4,7 @@ use axum::{
|
||||
BoxError,
|
||||
};
|
||||
use bytes::Bytes;
|
||||
use futures_util::TryStream;
|
||||
use futures_core::TryStream;
|
||||
use http::{header, StatusCode};
|
||||
use std::{io, path::Path};
|
||||
use tokio::{
|
||||
|
||||
Reference in New Issue
Block a user