From cffdedc0559939785d68ac6227667bdc8f96dca3 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Wed, 4 Aug 2021 15:07:04 +0200 Subject: [PATCH] Move comments in docs outside code block --- src/lib.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bdbfbf0a..3b302a94 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -624,22 +624,25 @@ //! //! # Required dependencies //! -//! To use Axum there are a few dependencies you have pull in as well: +//! To use axum there are a few dependencies you have pull in as well: //! -//! ```not_rust +//! ```toml //! [dependencies] //! axum = "" -//! -//! // "full" isn't strictly necessary for tokio and hyper but its the -//! // easiest way to get started. //! hyper = { version = "", features = ["full"] } //! tokio = { version = "", features = ["full"] } -//! -//! // Not strictly necessary but helpful for testing. There is a -//! // testing example in the repo that shows how to test axum apps. //! tower = "" //! ``` //! +//! The `"full"` feature for hyper and tokio isn't strictly necessary but its +//! the easiest way to get started. +//! +//! Note that [`hyper::Server`] is re-exported by axum so if thats all you need +//! then you don't have to explicitly depend on hyper. +//! +//! Tower isn't strictly necessary either but helpful for testing. See the +//! testing example in the repo to learn more about testing axum apps. +//! //! # Examples //! //! The axum repo contains [a number of examples][examples] that show how to put all the @@ -665,6 +668,7 @@ //! [`IntoResponse`]: crate::response::IntoResponse //! [`Timeout`]: tower::timeout::Timeout //! [examples]: https://github.com/tokio-rs/axum/tree/main/examples +//! [`hyper::Server`]: hyper::server::Server #![doc(html_root_url = "https://docs.rs/axum/0.1.2")] #![warn(