mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
axum-extra: Make axum optional dependency (#3485)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use axum::response::IntoResponse;
|
||||
use axum_core::response::IntoResponse;
|
||||
use http::{header, HeaderMap, HeaderValue};
|
||||
use tracing::error;
|
||||
|
||||
@@ -79,7 +79,7 @@ impl<T> IntoResponse for Attachment<T>
|
||||
where
|
||||
T: IntoResponse,
|
||||
{
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
fn into_response(self) -> axum_core::response::Response {
|
||||
let mut headers = HeaderMap::new();
|
||||
|
||||
if let Some(content_type) = self.content_type {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use axum::{
|
||||
http::{header, HeaderValue, StatusCode},
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use axum_core::response::{IntoResponse, Response};
|
||||
use bytes::{BufMut, Bytes, BytesMut};
|
||||
use http::{header, HeaderValue, StatusCode};
|
||||
use serde_core::Serialize;
|
||||
|
||||
/// A response type that holds a JSON in serialized form.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use axum::{
|
||||
use axum_core::{
|
||||
body,
|
||||
response::{IntoResponse, Response},
|
||||
BoxError,
|
||||
|
||||
@@ -60,11 +60,11 @@ macro_rules! mime_response {
|
||||
#[must_use]
|
||||
pub struct $ident<T>(pub T);
|
||||
|
||||
impl<T> axum::response::IntoResponse for $ident<T>
|
||||
impl<T> axum_core::response::IntoResponse for $ident<T>
|
||||
where
|
||||
T: axum::response::IntoResponse,
|
||||
T: axum_core::response::IntoResponse,
|
||||
{
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
fn into_response(self) -> axum_core::response::Response {
|
||||
(
|
||||
[(
|
||||
http::header::CONTENT_TYPE,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Generate forms to use in responses.
|
||||
|
||||
use axum::response::{IntoResponse, Response};
|
||||
use axum_core::response::{IntoResponse, Response};
|
||||
use fastrand;
|
||||
use http::{header, HeaderMap, StatusCode};
|
||||
use mime::Mime;
|
||||
|
||||
Reference in New Issue
Block a user