aboutsummaryrefslogtreecommitdiff
path: root/rossweisse/src/lib.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-05-05 01:42:57 +0000
committerFuwn <[email protected]>2023-05-05 01:42:57 +0000
commit459d93761ade7056632aa2dcd64ff1744cf00f6b (patch)
tree3a700c6b72ca52727a69f4e9e06b8b4bde515796 /rossweisse/src/lib.rs
parentfeat(windmark): prelude feature flag (diff)
downloadwindmark-459d93761ade7056632aa2dcd64ff1744cf00f6b.tar.xz
windmark-459d93761ade7056632aa2dcd64ff1744cf00f6b.zip
docs: fix for prelude
Diffstat (limited to 'rossweisse/src/lib.rs')
-rw-r--r--rossweisse/src/lib.rs18
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!")
/// }
/// }
/// ```