aboutsummaryrefslogtreecommitdiff
path: root/src/utils/mod.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-06 10:17:08 -0800
committerAustin Hellyer <[email protected]>2016-11-06 10:17:08 -0800
commit8f145f223804b869df2304a64ce5d3d42c772226 (patch)
tree285a7c187c876f9acd1eaf5c7031704209bcf01e /src/utils/mod.rs
parentMove HTTP/ratelimiting into a separate module (diff)
downloadserenity-8f145f223804b869df2304a64ce5d3d42c772226.tar.xz
serenity-8f145f223804b869df2304a64ce5d3d42c772226.zip
Add some more documentation
Diffstat (limited to 'src/utils/mod.rs')
-rw-r--r--src/utils/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs
index 3ad6303..e6d2b4c 100644
--- a/src/utils/mod.rs
+++ b/src/utils/mod.rs
@@ -83,10 +83,12 @@ macro_rules! request {
/// # Examples
/// Retrieving the code from the URL `https://discord.gg/0cDvIgU2voY8RSYL`:
///
-/// ```rust
+/// ```rust,ignore
/// use serenity::utils;
///
-/// assert!(utils::parse_invite("https://discord.gg/0cDvIgU2voY8RSYL") == "0cDvIgU2voY8RSYL");
+/// let url = "https://discord.gg/0cDvIgU2voY8RSYL";
+///
+/// assert!(utils::parse_invite(url) == "0cDvIgU2voY8RSYL");
/// ```
///
/// [`RichInvite`]: ../model/struct.RichInvite.html
@@ -117,6 +119,8 @@ pub fn parse_invite(code: &str) -> &str {
/// Ok(image) => image,
/// Err(why) => {
/// // properly handle the error
+///
+/// return;
/// },
/// };
/// ```