From 399edf8f800100a7a15d1c272897bf232d0c5bb3 Mon Sep 17 00:00:00 2001 From: Jokler Date: Thu, 20 Sep 2018 00:42:20 +0200 Subject: Main: Remove diesel_infer_schema dep & run clippy This should fix travis-ci since diesel_infer_schema is deprecated. --- src/plugins/emoji.rs | 6 +++--- src/plugins/remind/parser.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/plugins/emoji.rs b/src/plugins/emoji.rs index 01fb39c..d738110 100644 --- a/src/plugins/emoji.rs +++ b/src/plugins/emoji.rs @@ -67,7 +67,7 @@ impl Emoji { let mut current = EmojiHandle::default(); for c in string.chars() { - if !self.is_emoji(&c) { + if !self.is_emoji(c) { continue; } @@ -92,10 +92,10 @@ impl Emoji { emojis } - fn is_emoji(&self, c: &char) -> bool { + fn is_emoji(&self, c: char) -> bool { // Emoji ranges from stackoverflow: // https://stackoverflow.com/questions/30757193/find-out-if-character-in-string-is-emoji - match *c { '\u{1F600}'...'\u{1F64F}' // Emoticons + match c { '\u{1F600}'...'\u{1F64F}' // Emoticons | '\u{1F300}'...'\u{1F5FF}' // Misc Symbols and Pictographs | '\u{1F680}'...'\u{1F6FF}' // Transport and Map | '\u{2600}' ...'\u{26FF}' // Misc symbols diff --git a/src/plugins/remind/parser.rs b/src/plugins/remind/parser.rs index d6e8574..965ad99 100644 --- a/src/plugins/remind/parser.rs +++ b/src/plugins/remind/parser.rs @@ -68,7 +68,7 @@ impl CommandParser { if next_state != state { if state != ParseState::None { - self = self.add_string_by_state(&state, cur_str)?; + self = self.add_string_by_state(state, cur_str)?; cur_str = String::new(); } @@ -76,7 +76,7 @@ impl CommandParser { } } - self = self.add_string_by_state(&state, cur_str)?; + self = self.add_string_by_state(state, cur_str)?; if self.message.is_none() { return Err(ErrorKind::MissingMessage.into()); @@ -95,7 +95,7 @@ impl CommandParser { Ok(self) } - fn add_string_by_state(self, state: &ParseState, string: String) -> Result { + fn add_string_by_state(self, state: ParseState, string: String) -> Result { use self::ParseState::*; let string = Some(string); match state { -- cgit v1.2.3-70-g09d2