diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-09-20 00:42:20 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-09-20 00:43:34 +0200 |
| commit | 399edf8f800100a7a15d1c272897bf232d0c5bb3 (patch) | |
| tree | 9c1b0ab0e463739401c8370291f12073345d653e | |
| parent | a862046b0d34a2d23fdfa25d7bfb5dcc8c73dd45 (diff) | |
| download | frippy-399edf8f800100a7a15d1c272897bf232d0c5bb3.tar.gz frippy-399edf8f800100a7a15d1c272897bf232d0c5bb3.zip | |
Main: Remove diesel_infer_schema dep & run clippy
This should fix travis-ci since
diesel_infer_schema is deprecated.
| -rw-r--r-- | Cargo.lock | 80 | ||||
| -rw-r--r-- | Cargo.toml | 8 | ||||
| -rw-r--r-- | src/plugins/emoji.rs | 6 | ||||
| -rw-r--r-- | src/plugins/remind/parser.rs | 6 |
4 files changed, 7 insertions, 93 deletions
@@ -235,15 +235,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "derive-error-chain" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "diesel" version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -266,14 +257,6 @@ dependencies = [ ] [[package]] -name = "diesel_infer_schema" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "infer_schema_macros 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "diesel_migrations" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -283,16 +266,6 @@ dependencies = [ ] [[package]] -name = "dotenv" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "derive-error-chain 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "dtoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -369,11 +342,6 @@ dependencies = [ [[package]] name = "error-chain" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "error-chain" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ @@ -436,7 +404,6 @@ dependencies = [ "circular-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", "diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel_infer_schema 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "frippy_derive 0.1.0", @@ -612,25 +579,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "infer_schema_internals" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "infer_schema_macros" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dotenv 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "infer_schema_internals 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1163,18 +1111,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ @@ -1187,14 +1123,6 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ @@ -1936,12 +1864,9 @@ dependencies = [ "checksum crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3486aefc4c0487b9cb52372c97df0a48b8c249514af1ee99703bf70d2f2ceda1" "checksum crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30fecfcac6abfef8771151f8be4abc9e4edc112c2bcb233314cafde2680536e9" "checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015" -"checksum derive-error-chain 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9ca9ade651388daad7c993f005d0d20c4f6fe78c1cdc93e95f161c6f5ede4a" "checksum diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "164080ac16a4d1d80a50f0a623e4ddef41cb2779eee85bcc76907d340dfc98cc" "checksum diesel_derives 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03bcaf77491f53e400d5ee3bdd57142ea4e1c47fe9217b3361ff9a76ca0e3d37" -"checksum diesel_infer_schema 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e8a1dd088bb77bc1cdc144c3085068a61c4d9bd0780b77b2c1eb102c6aad986c" "checksum diesel_migrations 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b42c35d1ce9e8d57a3e7001b4127f2bc1b073a89708bb7019f5be27c991c28" -"checksum dotenv 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d6f0e2bb24d163428d8031d3ebd2d2bd903ad933205a97d0f18c7c1aade380f3" "checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" @@ -1952,7 +1877,6 @@ dependencies = [ "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" "checksum encoding_rs 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2a91912d6f37c6a8fef8a2316a862542d036f13c923ad518b5aca7bcaac7544c" -"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7efb22686e4a466b1ec1a15c2898f91fa9cb340452496dca654032de20ff95b9" "checksum failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "946d0e98a50d9831f5d589038d2ca7f8f455b1c21028c0db0e84116a12696426" @@ -1976,8 +1900,6 @@ dependencies = [ "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" "checksum indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08173ba1e906efb6538785a8844dd496f5d34f0a2d88038e95195172fc667220" -"checksum infer_schema_internals 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4e0f1e381ff29feef92a7a4037d4d564007a43daca9aa79c578d99538e2a6623" -"checksum infer_schema_macros 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2394a0407ac25980f6259e56f947e02748dbef3ecd44cf46f0a4f60bd369b599" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum irc 0.13.5 (git+https://github.com/aatxe/irc/?branch=develop)" = "<none>" "checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" @@ -2039,9 +1961,7 @@ dependencies = [ "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" "checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" -"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" "checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" -"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum reqwest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1cd396ef9387a076401c19701a86bc08d349ce45eab331247632b4bc9d0bd592" @@ -16,7 +16,6 @@ doc = false [features] mysql = [ "diesel", - "diesel_infer_schema", "diesel_migrations", "r2d2", "r2d2-diesel" @@ -57,11 +56,6 @@ version = "1.3.3" optional = true features = ["mysql", "chrono"] -[dependencies.diesel_infer_schema] -version = "1.3.0" -optional = true -features = ["mysql"] - [dependencies.diesel_migrations] version = "1.3.0" optional = true @@ -76,5 +70,5 @@ version = "1.0.0" optional = true [dependencies.clippy] -version = "*" +version = "0.0.212" optional = true 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<C: FrippyClient> Emoji<C> { 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<C: FrippyClient> Emoji<C> { 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<Self, RemindError> { + fn add_string_by_state(self, state: ParseState, string: String) -> Result<Self, RemindError> { use self::ParseState::*; let string = Some(string); match state { |
