diff options
| author | Austin Hellyer <[email protected]> | 2017-02-07 07:51:53 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2017-02-07 07:51:53 -0800 |
| commit | 5a671a28274d38a2a8f2f24a2e6de625a23e3197 (patch) | |
| tree | 31734eae3cc69c0fb8b986a8a061f93cbd030c79 /src/client/mod.rs | |
| parent | Standardize methods for creating messages (diff) | |
| download | serenity-5a671a28274d38a2a8f2f24a2e6de625a23e3197.tar.xz serenity-5a671a28274d38a2a8f2f24a2e6de625a23e3197.zip | |
Fix a clippy lint
Diffstat (limited to 'src/client/mod.rs')
| -rw-r--r-- | src/client/mod.rs | 6 |
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) |