From 4130d9b299265df7c06a9dcfa426746a870be615 Mon Sep 17 00:00:00 2001 From: Jokler Date: Sat, 14 Oct 2017 04:46:05 +0200 Subject: Adjust formatting with cargo fmt --- src/lib.rs | 14 ++++++++------ src/plugins/currency.rs | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index c556a32..873358a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 { if let PRIVMSG(_, ref content) = message.command { // Split content by spaces and filter empty tokens - let mut tokens: Vec = content - .split(' ') - .map(ToOwned::to_owned) - .collect(); + let mut tokens: Vec = 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 { // 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) } -- cgit v1.2.3-70-g09d2