From 3ab3e5f91d3442fff96273025f2cd0506dd58370 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sun, 20 Nov 2022 22:48:41 +0200 Subject: [PATCH] Use `http` re-export in docs (#1554) --- axum-core/src/extract/mod.rs | 2 +- axum/src/handler/mod.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/axum-core/src/extract/mod.rs b/axum-core/src/extract/mod.rs index 2eb37ea4..537f3476 100644 --- a/axum-core/src/extract/mod.rs +++ b/axum-core/src/extract/mod.rs @@ -82,7 +82,7 @@ pub trait FromRequestParts: Sized { /// use axum::{ /// async_trait, /// extract::FromRequest, -/// http::Request, +/// http::{self, Request}, /// }; /// /// struct MyExtractor; diff --git a/axum/src/handler/mod.rs b/axum/src/handler/mod.rs index 6a2df1e6..a52f09f2 100644 --- a/axum/src/handler/mod.rs +++ b/axum/src/handler/mod.rs @@ -5,8 +5,7 @@ //! Some examples of handlers: //! //! ```rust -//! use axum::body::Bytes; -//! use http::StatusCode; +//! use axum::{body::Bytes, http::StatusCode}; //! //! // Handler that immediately returns an empty `200 OK` response. //! async fn unit_handler() {}