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/framework/standard/configuration.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/framework/standard/configuration.rs')
| -rw-r--r-- | src/framework/standard/configuration.rs | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/src/framework/standard/configuration.rs b/src/framework/standard/configuration.rs index 015fb42..58861bb 100644 --- a/src/framework/standard/configuration.rs +++ b/src/framework/standard/configuration.rs @@ -33,34 +33,20 @@ use model::{GuildId, Message, UserId}; /// [`Client`]: ../../client/struct.Client.html /// [`Framework`]: struct.Framework.html pub struct Configuration { - #[doc(hidden)] - pub allow_dm: bool, - #[doc(hidden)] - pub allow_whitespace: bool, - #[doc(hidden)] - pub blocked_guilds: HashSet<GuildId>, - #[doc(hidden)] - pub blocked_users: HashSet<UserId>, - #[doc(hidden)] - pub depth: usize, - #[doc(hidden)] - pub disabled_commands: HashSet<String>, - #[doc(hidden)] - pub dynamic_prefix: Option<Box<PrefixCheck>>, - #[doc(hidden)] - pub ignore_bots: bool, - #[doc(hidden)] - pub ignore_webhooks: bool, - #[doc(hidden)] - pub on_mention: Option<Vec<String>>, - #[doc(hidden)] - pub owners: HashSet<UserId>, - #[doc(hidden)] - pub prefixes: Vec<String>, - #[doc(hidden)] - pub delimiters: Vec<String>, - #[doc(hidden)] - pub case_insensitive: bool, + #[doc(hidden)] pub allow_dm: bool, + #[doc(hidden)] pub allow_whitespace: bool, + #[doc(hidden)] pub blocked_guilds: HashSet<GuildId>, + #[doc(hidden)] pub blocked_users: HashSet<UserId>, + #[doc(hidden)] pub depth: usize, + #[doc(hidden)] pub disabled_commands: HashSet<String>, + #[doc(hidden)] pub dynamic_prefix: Option<Box<PrefixCheck>>, + #[doc(hidden)] pub ignore_bots: bool, + #[doc(hidden)] pub ignore_webhooks: bool, + #[doc(hidden)] pub on_mention: Option<Vec<String>>, + #[doc(hidden)] pub owners: HashSet<UserId>, + #[doc(hidden)] pub prefixes: Vec<String>, + #[doc(hidden)] pub delimiters: Vec<String>, + #[doc(hidden)] pub case_insensitive: bool, } impl Configuration { @@ -271,8 +257,8 @@ impl Configuration { if let Ok(current_user) = http::get_current_user() { self.on_mention = Some(vec![ - format!("<@{}>", current_user.id), // Regular mention - format!("<@!{}>", current_user.id) /* Nickname mention */, + format!("<@{}>", current_user.id), // Regular mention + format!("<@!{}>", current_user.id), // Nickname mention ]); } @@ -417,9 +403,8 @@ impl Configuration { /// ``` pub fn delimiters(mut self, delimiters: Vec<&str>) -> Self { self.delimiters.clear(); - self.delimiters.extend( - delimiters.into_iter().map(|s| s.to_string()), - ); + self.delimiters + .extend(delimiters.into_iter().map(|s| s.to_string())); self } |