Skip to content

Commit 0462256

Browse files
committed
docs(README): Fix example use declarations
1 parent 8772aaa commit 0462256

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ tokio = { version = "1.26.0", features = ["full"] }
5353
```rust
5454
// src/main.rs
5555

56-
// ...
56+
use windmark::response::Response;
5757

5858
#[windmark::main]
5959
async fn main() -> Result<(), Box<dyn std::error::Error>> {
6060
windmark::router::Router::new()
6161
.set_private_key_file("windmark_private.pem")
6262
.set_certificate_file("windmark_public.pem")
63-
.mount("/", windmark::success!("Hello, World!"))
63+
.mount("/", |_| Response::success("Hello, World!"))
6464
.set_error_handler(|_|
65-
windmark::response::Response::permanent_failure("This route does not exist!")
65+
Response::permanent_failure("This route does not exist!")
6666
)
6767
.run()
6868
.await
@@ -74,14 +74,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
7474
```rust
7575
// src/main.rs
7676

77-
// ...
77+
use windmark::response::Response;
7878

7979
#[rossweisse::router]
8080
struct Router;
8181

8282
#[rossweisse::router]
8383
impl Router {
84-
#[route(index)]
84+
#[rossweisse::route(index)]
8585
pub fn index(
8686
_context: windmark::context::RouteContext,
8787
) -> Response {

0 commit comments

Comments
 (0)