From 587001724acf8a7c6de30927da31c1f5fd7fdb09 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 23 Oct 2022 17:01:26 -0500 Subject: [PATCH] add `# Examples` to some docs --- azalea-client/src/client.rs | 2 ++ azalea-client/src/ping.rs | 4 +++- azalea-protocol/src/connect.rs | 2 ++ azalea/src/lib.rs | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index fc4ff477..af47b2cd 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -123,6 +123,8 @@ pub enum HandleError { impl Client { /// Connect to a Minecraft server. /// + /// # Examples + /// /// ```rust,no_run /// use azalea_client::Client; /// diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs index 6817677e..ed4197ba 100755 --- a/azalea-client/src/ping.rs +++ b/azalea-client/src/ping.rs @@ -32,7 +32,9 @@ pub enum PingError { /// Ping a Minecraft server. /// -/// ``` +/// # Examples +/// +/// ```rust,no_run /// use azalea_client::ping; /// /// #[tokio::main] diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index c996001d..39e34948 100644 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -165,6 +165,8 @@ impl Connection { /// online-mode servers. This must happen when you get a /// `ClientboundLoginPacket::Hello` packet. /// + /// # Examples + /// /// ```rust,no_run /// let token = azalea_auth::auth(azalea_auth::AuthOpts { /// ..Default::default() diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index 148dfca7..013e2dd3 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -128,6 +128,8 @@ pub enum Error { /// Join a server and start handling events. This function will run forever until /// it gets disconnected from the server. /// +/// # Examples +/// /// ```rust,no_run /// let error = azalea::start(azalea::Options { /// account,