diff options
Diffstat (limited to 'rossweisse/src')
| -rw-r--r-- | rossweisse/src/lib.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/rossweisse/src/lib.rs b/rossweisse/src/lib.rs index 315a0de..612bbac 100644 --- a/rossweisse/src/lib.rs +++ b/rossweisse/src/lib.rs @@ -39,6 +39,9 @@ use syn::Item; /// # Examples /// /// ```rust +/// use rossweisse::route; +/// use windmark::response::Response; +/// /// #[rossweisse::router] /// struct Router { /// _phantom: (), @@ -47,10 +50,8 @@ use syn::Item; /// #[rossweisse::router] /// impl Router { /// #[route] -/// pub fn index( -/// _context: windmark::context::RouteContext, -/// ) -> windmark::Response { -/// windmark::Response::success("Hello, World!") +/// pub fn index(_context: windmark::context::RouteContext) -> Response { +/// Response::success("Hello, World!") /// } /// } /// ``` @@ -70,13 +71,14 @@ pub fn router(arguments: TokenStream, item: TokenStream) -> TokenStream { /// # Examples /// /// ```rust +/// use rossweisse::route; +/// use windmark::response::Response; +/// /// #[rossweisse::router] /// impl Router { /// #[route] -/// pub fn index( -/// _context: windmark::context::RouteContext, -/// ) -> windmark::Response { -/// windmark::Response::success("Hello, World!") +/// pub fn index(_context: windmark::context::RouteContext) -> Response { +/// Response::success("Hello, World!") /// } /// } /// ``` |