From b4696115c05eefaabff8b0f5ceb3b12b900dda2b Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Mon, 18 Feb 2019 18:49:43 +0100 Subject: [PATCH] Use a normal `main` as 1.25 Rust does not support mains returning Results --- src/client/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index 27208d25cb6..80ac2148f4d 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -74,7 +74,7 @@ use self::bridge::voice::ClientVoiceManager; /// receive, acting as a "ping-pong" bot is simple: /// /// ```no_run -/// # fn main() -> Result<(), Box> { +/// # fn try_main() -> Result<(), Box> { /// use serenity::prelude::*; /// use serenity::model::prelude::*; /// use serenity::Client; @@ -93,6 +93,8 @@ use self::bridge::voice::ClientVoiceManager; /// /// client.start(); /// # Ok(()) } +/// # +/// # fn main() { try_main().unwrap(); } /// ``` /// /// [`Shard`]: ../gateway/struct.Shard.html @@ -122,7 +124,7 @@ pub struct Client { /// - [`Event::MessageUpdate`] /// /// ```no_run - /// # fn main() -> Result<(), Box> { + /// # fn try_main() -> Result<(), Box> { /// extern crate serenity; /// /// // Of note, this imports `typemap`'s `Key` as `TypeMapKey`. @@ -167,6 +169,8 @@ pub struct Client { /// /// client.start()?; /// # Ok(()) } + /// # + /// # fn main() { try_main().unwrap(); } /// ``` /// /// Refer to [example 05] for an example on using the `data` field.