aboutsummaryrefslogtreecommitdiff
path: root/src/model/channel/guild_channel.rs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-11-01 20:47:08 -0700
committerZeyla Hellyer <[email protected]>2017-11-03 07:13:38 -0700
commitb19b031a5052a268f323a116403ea66ca71ea575 (patch)
tree0ca71c6736214c40768b409b3a2222f2a3c387ec /src/model/channel/guild_channel.rs
parentMake `Command::aliases` public (diff)
downloadserenity-b19b031a5052a268f323a116403ea66ca71ea575.tar.xz
serenity-b19b031a5052a268f323a116403ea66ca71ea575.zip
Make the Client return a Result
The client now returns a Result in preparation of a future commit. Upgrade path: Handle the case of an error via pattern matching, or unwrap the Result.
Diffstat (limited to 'src/model/channel/guild_channel.rs')
-rw-r--r--src/model/channel/guild_channel.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/model/channel/guild_channel.rs b/src/model/channel/guild_channel.rs
index 3f09bd7..8fc9abb 100644
--- a/src/model/channel/guild_channel.rs
+++ b/src/model/channel/guild_channel.rs
@@ -442,7 +442,9 @@ impl GuildChannel {
/// println!("The user's permissions: {:?}", permissions);
/// }
/// }
- /// let mut client = Client::new("token", Handler); client.start().unwrap();
+ /// let mut client = Client::new("token", Handler).unwrap();
+ ///
+ /// client.start().unwrap();
/// ```
///
/// Check if the current user has the [Attach Files] and [Send Messages]
@@ -488,7 +490,9 @@ impl GuildChannel {
/// }
/// }
///
- /// let mut client = Client::new("token", Handler); client.start().unwrap();
+ /// let mut client = Client::new("token", Handler).unwrap();
+ ///
+ /// client.start().unwrap();
/// ```
///
/// # Errors