From 809930d36e3d414662205ad02eb514083843463b Mon Sep 17 00:00:00 2001 From: Elliot Jackson Date: Wed, 19 Feb 2020 21:13:10 +0100 Subject: [PATCH] Add dependencies to docs example (#1343) * Add dependencies to docs example * Change codeblock type to toml * Clarify the need for actix-rt Co-authored-by: Yuki Okushi --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index d51005cfe..a898bd704 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,6 +7,12 @@ //! Actix web is a small, pragmatic, and extremely fast web framework //! for Rust. //! +//! ## Example +//! +//! The `#[actix_rt::main]` macro in the example below is provided by the Actix runtime +//! crate, [`actix-rt`](https://crates.io/crates/actix-rt). You will need to include +//! `actix-rt` in your dependencies for it to run. +//! //! ```rust,no_run //! use actix_web::{web, App, Responder, HttpServer}; //!