aboutsummaryrefslogtreecommitdiff
path: root/examples/simple_async_std.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-05-05 01:33:55 +0000
committerFuwn <[email protected]>2023-05-05 01:33:55 +0000
commitd66da17c17239408f2ddbc2794621e2d947056a3 (patch)
treee448da50c46c429f6ca672aa070577766fffc9bc /examples/simple_async_std.rs
parentdocs(rossweisse): revert to implementation (diff)
downloadwindmark-d66da17c17239408f2ddbc2794621e2d947056a3.tar.xz
windmark-d66da17c17239408f2ddbc2794621e2d947056a3.zip
feat(windmark): prelude feature flag
Diffstat (limited to 'examples/simple_async_std.rs')
-rw-r--r--examples/simple_async_std.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/simple_async_std.rs b/examples/simple_async_std.rs
index 9896590..75cd66e 100644
--- a/examples/simple_async_std.rs
+++ b/examples/simple_async_std.rs
@@ -19,10 +19,12 @@
#[windmark::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
- windmark::Router::new()
+ windmark::router::Router::new()
.set_private_key_file("windmark_private.pem")
.set_certificate_file("windmark_public.pem")
- .mount("/", |_| windmark::Response::success("Hello, async-std!"))
+ .mount("/", |_| {
+ windmark::response::Response::success("Hello, async-std!")
+ })
.run()
.await
}