diff options
| author | Zeyla Hellyer <[email protected]> | 2017-09-18 17:48:52 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-09-18 17:48:52 -0700 |
| commit | dae2cb77b407044f44a7a2790d93efba3891854e (patch) | |
| tree | bef263c4490536cf8b56e988e71dd1aa43bc2696 /src/model/utils.rs | |
| parent | Fix compiles of a variety of feature combinations (diff) | |
| download | serenity-dae2cb77b407044f44a7a2790d93efba3891854e.tar.xz serenity-dae2cb77b407044f44a7a2790d93efba3891854e.zip | |
Apply rustfmt
Diffstat (limited to 'src/model/utils.rs')
| -rw-r--r-- | src/model/utils.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/model/utils.rs b/src/model/utils.rs index c90ce46..719a472 100644 --- a/src/model/utils.rs +++ b/src/model/utils.rs @@ -157,9 +157,7 @@ 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::Category(_) => { + Channel::Group(_) | Channel::Private(_) | Channel::Category(_) => { // Both users in DMs, and all users in groups and maybe all channels in categories will // have the same // permissions. @@ -179,10 +177,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); |