aboutsummaryrefslogtreecommitdiff
path: root/examples/windmark.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-05 02:47:07 +0000
committerFuwn <[email protected]>2023-04-05 02:47:07 +0000
commit6909271fa6488c2ba285aa67f2faa502bd5b6be6 (patch)
treeb76e33cdc88fd9bde2e59af0658c0302745c2be4 /examples/windmark.rs
parentfeat(module): async module support (diff)
downloadwindmark-6909271fa6488c2ba285aa67f2faa502bd5b6be6.tar.xz
windmark-6909271fa6488c2ba285aa67f2faa502bd5b6be6.zip
feat(route): merge async and sync mount functions !!
Diffstat (limited to 'examples/windmark.rs')
-rw-r--r--examples/windmark.rs4
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.") }
});