From e396c90c9ec0cdfb3b384dd4c16ea8a5b6e96757 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 16 Mar 2019 21:13:16 -0700 Subject: [PATCH] update api doc --- src/data.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/data.rs b/src/data.rs index 6fb8e0b9f..a53015c23 100644 --- a/src/data.rs +++ b/src/data.rs @@ -34,6 +34,9 @@ pub(crate) trait DataFactoryResult { /// threads, a shared object should be used, e.g. `Arc`. Application /// data does not need to be `Send` or `Sync`. /// +/// If route data is not set for a handler, using `Data` extractor would +/// cause *Internal Server Error* response. +/// /// ```rust /// use std::cell::Cell; /// use actix_web::{web, App}; @@ -165,6 +168,9 @@ where /// configuration storage. Route data could be accessed in handler /// via `RouteData` extractor. /// +/// If route data is not set for a handler, using `RouteData` extractor +/// would cause *Internal Server Error* response. +/// /// ```rust /// # use std::cell::Cell; /// use actix_web::{web, App}; @@ -192,9 +198,6 @@ where /// )); /// } /// ``` -/// -/// If route data is not set for a handler, using `RouteData` extractor -/// would cause `Internal Server error` response. pub struct RouteData(Arc); impl RouteData {