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 | 47e14eefd6f910496f089d66336e2506e210458b (patch) | |
| tree | 3a700c6b72ca52727a69f4e9e06b8b4bde515796 /rossweisse | |
| parent | feat(windmark): prelude feature flag (diff) | |
| download | windmark-47e14eefd6f910496f089d66336e2506e210458b.tar.xz windmark-47e14eefd6f910496f089d66336e2506e210458b.zip | |
docs: fix for prelude
Diffstat (limited to 'rossweisse')
| -rw-r--r-- | rossweisse/README.md | 5 | ||||
| -rw-r--r-- | rossweisse/src/lib.rs | 18 |
2 files changed, 13 insertions, 10 deletions
diff --git a/rossweisse/README.md b/rossweisse/README.md index cbcf53a..23af367 100644 --- a/rossweisse/README.md +++ b/rossweisse/README.md @@ -10,6 +10,7 @@ For now, a simple Rosswiesse router can be implemented like this: ```rust use rossweisse::route; +use windmark::response::Response; #[rossweisse::router] struct Router { @@ -21,8 +22,8 @@ impl Router { #[route(index)] pub fn index( _context: windmark::context::RouteContext, - ) -> windmark::Response { - windmark::Response::success("Hello, World!") + ) -> Response { + Response::success("Hello, World!") } } 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!") /// } /// } /// ``` |