diff options
| author | Jokler <jokler.contact@gmail.com> | 2017-10-14 04:46:05 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2017-10-14 04:46:05 +0200 |
| commit | 4130d9b299265df7c06a9dcfa426746a870be615 (patch) | |
| tree | b35b6a64d77a0b6b01d76ded0db04c5ec7f8dbcf | |
| parent | bea4d2a63b15eb3f908d8612bdc94dca1829229f (diff) | |
| download | frippy-4130d9b299265df7c06a9dcfa426746a870be615.tar.gz frippy-4130d9b299265df7c06a9dcfa426746a870be615.zip | |
Adjust formatting with cargo fmt
| -rw-r--r-- | src/lib.rs | 14 | ||||
| -rw-r--r-- | src/plugins/currency.rs | 2 |
2 files changed, 9 insertions, 7 deletions
@@ -105,7 +105,9 @@ pub fn run() { if let Some(mut c) = command.clone() { // Skip empty commands - if c.tokens.is_empty() { continue; } + if c.tokens.is_empty() { + continue; + } if lock_plugin!(plugin).name().to_lowercase() == c.tokens[0].to_lowercase() { @@ -132,10 +134,7 @@ fn get_command(nick: &str, message: &Message) -> Option<PluginCommand> { if let PRIVMSG(_, ref content) = message.command { // Split content by spaces and filter empty tokens - let mut tokens: Vec<String> = content - .split(' ') - .map(ToOwned::to_owned) - .collect(); + let mut tokens: Vec<String> = content.split(' ').map(ToOwned::to_owned).collect(); // Commands start with our name if tokens[0].to_lowercase().starts_with(nick) { @@ -145,7 +144,10 @@ fn get_command(nick: &str, message: &Message) -> Option<PluginCommand> { // We assume that only ':' and ',' are used as suffixes on IRC // If there are any other chars we assume that it is not ment for the bot - tokens[0] = tokens[0].chars().filter(|&c| !":,".contains(c)).collect(); + tokens[0] = tokens[0] + .chars() + .filter(|&c| !":,".contains(c)) + .collect(); if !tokens[0].is_empty() { return None; } diff --git a/src/plugins/currency.rs b/src/plugins/currency.rs index c6f0b2f..bc87592 100644 --- a/src/plugins/currency.rs +++ b/src/plugins/currency.rs @@ -116,7 +116,7 @@ impl Currency { IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, \ NZD, PHP, PLN, RON, RUB, SEK, SGD, THB, \ TRY, USD, ZAR", - server.current_nickname()); + server.current_nickname()); server.send_notice(&command.source, &help) } |
