aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-17 07:00:22 +0000
committerFuwn <[email protected]>2023-04-17 07:00:22 +0000
commitb0083bfd295b820e9d90701474b2208fb0007b95 (patch)
treedc7fb4557699c679c33334c7334217b6ca21336a
parentrefactor: remove seldom used procedural macros (diff)
downloadgerm-b0083bfd295b820e9d90701474b2208fb0007b95.tar.xz
germ-b0083bfd295b820e9d90701474b2208fb0007b95.zip
docs(request): fix async request example
-rw-r--r--src/request/sync.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/request/sync.rs b/src/request/sync.rs
index 68c8a0f..f3cd7d1 100644
--- a/src/request/sync.rs
+++ b/src/request/sync.rs
@@ -27,11 +27,16 @@ use crate::request::Response;
/// # Example
///
/// ```rust
-/// match germ::request::request(&url::Url::parse("gemini://fuwn.me").unwrap())
+/// #[tokio::main]
+/// async fn main() {
+/// match germ::request::sync::request(
+/// &url::Url::parse("gemini://fuwn.me").unwrap(),
+/// )
/// .await
-/// {
-/// Ok(response) => println!("{:?}", response),
-/// Err(_) => {}
+/// {
+/// Ok(response) => println!("{:?}", response),
+/// Err(_) => {}
+/// }
/// }
/// ```
///