diff options
| author | Fuwn <[email protected]> | 2023-05-05 01:42:57 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-05-05 01:42:57 +0000 |
| commit | 459d93761ade7056632aa2dcd64ff1744cf00f6b (patch) | |
| tree | 3a700c6b72ca52727a69f4e9e06b8b4bde515796 /rossweisse/src/lib.rs | |
| parent | feat(windmark): prelude feature flag (diff) | |
| download | windmark-459d93761ade7056632aa2dcd64ff1744cf00f6b.tar.xz windmark-459d93761ade7056632aa2dcd64ff1744cf00f6b.zip | |
docs: fix for prelude
Diffstat (limited to 'rossweisse/src/lib.rs')
| -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!") /// } /// } /// ``` |