aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/struct_router.rs4
-rw-r--r--rossweisse/README.md4
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/struct_router.rs b/examples/struct_router.rs
index af6bce9..a636f7d 100644
--- a/examples/struct_router.rs
+++ b/examples/struct_router.rs
@@ -17,6 +17,8 @@
//! `cargo run --example struct_router`
+use rossweisse::route;
+
#[rossweisse::router]
struct Router {
_phantom: (),
@@ -24,7 +26,7 @@ struct Router {
#[rossweisse::router]
impl Router {
- #[rossweisse::route(index)]
+ #[route(index)]
pub fn index(
_context: windmark::context::RouteContext,
) -> windmark::Response {
diff --git a/rossweisse/README.md b/rossweisse/README.md
index 117bff8..cbcf53a 100644
--- a/rossweisse/README.md
+++ b/rossweisse/README.md
@@ -9,6 +9,8 @@ Rossweisse is in it's infancy, and a much comprehensive interface is planned.
For now, a simple Rosswiesse router can be implemented like this:
```rust
+use rossweisse::route;
+
#[rossweisse::router]
struct Router {
_phantom: (),
@@ -16,7 +18,7 @@ struct Router {
#[rossweisse::router]
impl Router {
- #[rossweisse::route(index)]
+ #[route(index)]
pub fn index(
_context: windmark::context::RouteContext,
) -> windmark::Response {