aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2017-02-07 07:51:53 -0800
committerAustin Hellyer <[email protected]>2017-02-07 07:51:53 -0800
commit5a671a28274d38a2a8f2f24a2e6de625a23e3197 (patch)
tree31734eae3cc69c0fb8b986a8a061f93cbd030c79
parentStandardize methods for creating messages (diff)
downloadserenity-5a671a28274d38a2a8f2f24a2e6de625a23e3197.tar.xz
serenity-5a671a28274d38a2a8f2f24a2e6de625a23e3197.zip
Fix a clippy lint
-rw-r--r--src/client/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index be1dbd4..073ffb5 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -187,10 +187,10 @@ impl Client {
/// Discord has a requirement of prefixing bot tokens with `"Bot "`, which
/// this function will automatically do for you if not already included.
pub fn login_bot(bot_token: &str) -> Client {
- let token = if !bot_token.starts_with("Bot ") {
- format!("Bot {}", bot_token)
- } else {
+ let token = if bot_token.starts_with("Bot ") {
bot_token.to_owned()
+ } else {
+ format!("Bot {}", bot_token)
};
login(token, LoginType::Bot)