diff options
| author | Zeyla Hellyer <[email protected]> | 2017-08-18 16:14:32 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-08-18 17:52:53 -0700 |
| commit | e4113570967a1fb13539efbfa2cf7285b19d95ba (patch) | |
| tree | 06bb020fcfaa5f8323454dfb525272314a900186 /src/model/utils.rs | |
| parent | Move Clippy lints to a cfg_attr (diff) | |
| download | serenity-e4113570967a1fb13539efbfa2cf7285b19d95ba.tar.xz serenity-e4113570967a1fb13539efbfa2cf7285b19d95ba.zip | |
Apply rustfmt
Diffstat (limited to 'src/model/utils.rs')
| -rw-r--r-- | src/model/utils.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/model/utils.rs b/src/model/utils.rs index e793df2..9fed660 100644 --- a/src/model/utils.rs +++ b/src/model/utils.rs @@ -156,7 +156,8 @@ pub fn user_has_perms(channel_id: ChannelId, mut permissions: Permissions) -> Re let guild_id = match channel { Channel::Guild(channel) => channel.read().unwrap().guild_id, - Channel::Group(_) | Channel::Private(_) => { + Channel::Group(_) | + Channel::Private(_) => { // Both users in DMs, and all users in groups, will have the same // permissions. // @@ -175,10 +176,10 @@ pub fn user_has_perms(channel_id: ChannelId, mut permissions: Permissions) -> Re None => return Err(Error::Model(ModelError::ItemMissing)), }; - let perms = guild - .read() - .unwrap() - .permissions_for(channel_id, current_user.id); + let perms = guild.read().unwrap().permissions_for( + channel_id, + current_user.id, + ); permissions.remove(perms); |