Skip to content

Commit

Permalink
Do not return Result from main in tests
Browse files Browse the repository at this point in the history
This feature is special to 1.26, but we support 1.25
  • Loading branch information
arqunis committed Aug 7, 2018
1 parent aa437d4 commit e290b03
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ pub fn unpin_message(channel_id: u64, message_id: u64) -> Result<()> {
/// #
/// # use std::error::Error;
/// #
/// # fn main() -> Result<(), Box<Error>> {
/// # fn try_main() -> Result<(), Box<Error>> {
/// #
/// use serenity::{
/// http::{
Expand All @@ -1725,6 +1725,10 @@ pub fn unpin_message(channel_id: u64, message_id: u64) -> Result<()> {
/// #
/// # Ok(())
/// # }
/// #
/// # fn main() {
/// # try_main().unwrap();
/// # }
/// ```
///
/// [`request`]: fn.request.html
Expand All @@ -1748,7 +1752,7 @@ pub fn fire<T: DeserializeOwned>(req: Request) -> Result<T> {
/// #
/// # use std::error::Error;
/// #
/// # fn main() -> Result<(), Box<Error>> {
/// # fn try_main() -> Result<(), Box<Error>> {
/// #
/// use serenity::http::{
/// self,
Expand All @@ -1771,6 +1775,10 @@ pub fn fire<T: DeserializeOwned>(req: Request) -> Result<T> {
/// #
/// # Ok(())
/// # }
/// #
/// # fn main() {
/// # try_main().unwrap();
/// # }
/// ```
///
/// [`fire`]: fn.fire.html
Expand Down

0 comments on commit e290b03

Please sign in to comment.