diff options
| author | Fuwn <[email protected]> | 2023-04-05 02:47:07 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-04-05 02:47:07 +0000 |
| commit | 6909271fa6488c2ba285aa67f2faa502bd5b6be6 (patch) | |
| tree | b76e33cdc88fd9bde2e59af0658c0302745c2be4 /examples | |
| parent | feat(module): async module support (diff) | |
| download | windmark-6909271fa6488c2ba285aa67f2faa502bd5b6be6.tar.xz windmark-6909271fa6488c2ba285aa67f2faa502bd5b6be6.zip | |
feat(route): merge async and sync mount functions !!
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/windmark.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs index 9c19cc3..9e23d6e 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -200,7 +200,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { ) } }); - router.mount_async("/async", move |_| { + router.mount("/async", move |_| { let async_clicks = async_clicks.clone(); async move { @@ -211,7 +211,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { Response::success(*clicks) } }); - router.mount_async("/async-nothing", |_| { + router.mount("/async-nothing", |_| { async { Response::success("This is an async route.") } }); |