diff options
| author | acdenisSK <[email protected]> | 2018-08-07 11:27:07 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2018-08-07 11:27:07 +0200 |
| commit | e290b038242cec6d4465f96c22cff24578f1a068 (patch) | |
| tree | c9bf68c81186d8e7d523ecba17a5d835dd5aaecd /src/http | |
| parent | Dereference a destructure instead (diff) | |
| download | serenity-e290b038242cec6d4465f96c22cff24578f1a068.tar.xz serenity-e290b038242cec6d4465f96c22cff24578f1a068.zip | |
Do not return Result from main in tests
This feature is special to 1.26, but we support 1.25
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/mod.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 7d0ca17..51d89aa 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -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::{ @@ -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 @@ -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, @@ -1771,6 +1775,10 @@ pub fn fire<T: DeserializeOwned>(req: Request) -> Result<T> { /// # /// # Ok(()) /// # } +/// # +/// # fn main() { +/// # try_main().unwrap(); +/// # } /// ``` /// /// [`fire`]: fn.fire.html |