Skip to content

Commit

Permalink
Use a normal main as 1.25 Rust does not support mains returning Res…
Browse files Browse the repository at this point in the history
…ults
  • Loading branch information
arqunis committed Feb 18, 2019
1 parent 00990c0 commit b469611
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ use self::bridge::voice::ClientVoiceManager;
/// receive, acting as a "ping-pong" bot is simple:
///
/// ```no_run
/// # fn main() -> Result<(), Box<std::error::Error>> {
/// # fn try_main() -> Result<(), Box<std::error::Error>> {
/// use serenity::prelude::*;
/// use serenity::model::prelude::*;
/// use serenity::Client;
Expand All @@ -93,6 +93,8 @@ use self::bridge::voice::ClientVoiceManager;
///
/// client.start();
/// # Ok(()) }
/// #
/// # fn main() { try_main().unwrap(); }
/// ```
///
/// [`Shard`]: ../gateway/struct.Shard.html
Expand Down Expand Up @@ -122,7 +124,7 @@ pub struct Client {
/// - [`Event::MessageUpdate`]
///
/// ```no_run
/// # fn main() -> Result<(), Box<std::error::Error>> {
/// # fn try_main() -> Result<(), Box<std::error::Error>> {
/// extern crate serenity;
///
/// // Of note, this imports `typemap`'s `Key` as `TypeMapKey`.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b469611

Please sign in to comment.