aboutsummaryrefslogtreecommitdiff
path: root/src/model/guild
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-09-09 08:23:21 -0700
committerZeyla Hellyer <[email protected]>2017-09-09 08:23:21 -0700
commit1c138a357b37e3bd8002109cfb9a8da94a53810e (patch)
tree3256df54f6b31e0422848ea6bcc1d35e58b27eee /src/model/guild
parent`parent_id` -> `category_id` (diff)
downloadserenity-1c138a357b37e3bd8002109cfb9a8da94a53810e.tar.xz
serenity-1c138a357b37e3bd8002109cfb9a8da94a53810e.zip
Apply rustfmt + fix tests
Diffstat (limited to 'src/model/guild')
-rw-r--r--src/model/guild/member.rs7
-rw-r--r--src/model/guild/mod.rs2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/model/guild/member.rs b/src/model/guild/member.rs
index d9ac230..6873dc7 100644
--- a/src/model/guild/member.rs
+++ b/src/model/guild/member.rs
@@ -274,8 +274,9 @@ impl Member {
///
/// Returns a [`ModelError::GuildNotFound`] if the guild the member's in could not be
/// found in the cache.
- ///
- /// And/or returns [`ModelError::ItemMissing`] if the "default channel" of the guild is not found.
+ ///
+ /// And/or returns [`ModelError::ItemMissing`] if the "default channel" of the guild is not
+ /// found.
///
/// [`ModelError::GuildNotFound`]: enum.ModelError.html#variant.GuildNotFound
/// [`ModelError::ItemMissing`]: enum.ModelError.html#variant.ItemMissing
@@ -292,7 +293,7 @@ impl Member {
Some(dc) => dc,
None => return Err(From::from(ModelError::ItemMissing)),
};
-
+
Ok(guild.permissions_for(
default_channel.id,
self.user.read().unwrap().id,
diff --git a/src/model/guild/mod.rs b/src/model/guild/mod.rs
index 714cf5c..47f789e 100644
--- a/src/model/guild/mod.rs
+++ b/src/model/guild/mod.rs
@@ -207,7 +207,7 @@ impl Guild {
/// [`Guild::ban`]: struct.Guild.html#method.ban
/// [`User`]: struct.User.html
/// [Ban Members]: permissions/constant.BAN_MEMBERS.html
- pub fn ban<U: Into<UserId>, BO: BanOptions>(&self, user: U, options: BO) -> Result<()> {
+ pub fn ban<U: Into<UserId>, BO: BanOptions>(&self, user: U, options: BO) -> Result<()> {
#[cfg(feature = "cache")]
{
let req = permissions::BAN_MEMBERS;