Rocket

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 8b2ee5b99a91bffea21765f97adeb6d6f3c2228e
parent b42906327917fb7ee695f5db3353d1410fdaf72b
Author: Sergio Benitez <sb@sergio.bz>
Date:   Sun, 21 Oct 2018 23:43:24 -0700

Point 'FromData' implementors to 'FromDataSimple'.

Diffstat:
Mcore/lib/src/data/from_data.rs | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/core/lib/src/data/from_data.rs b/core/lib/src/data/from_data.rs @@ -120,6 +120,11 @@ pub type Transformed<'a, T> = /// Data guards are used as the target of the `data` route attribute parameter. /// A handler can have at most one data guard. /// +/// For many data guards, implementing [`FromDataSimple`] will be simpler and +/// sufficient. All types that implement `FromDataSimple` automatically +/// implement `FromData`. Thus, when possible, prefer to implement +/// [`FromDataSimple`] instead of `FromData`. +/// /// [request guard]: ::request::FromRequest /// /// ## Example