From 67ca69c1423162945814ffbcb25f8be808775035 Mon Sep 17 00:00:00 2001 From: YouKnow Date: Wed, 3 Apr 2024 04:43:41 +0330 Subject: [PATCH 01/14] Changed escape functions in both html and markdown utils to do less allocations and also be slightly faster --- crates/teloxide/src/utils/html.rs | 10 +++++- crates/teloxide/src/utils/markdown.rs | 45 +++++++++++++++------------ 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/crates/teloxide/src/utils/html.rs b/crates/teloxide/src/utils/html.rs index 37f6f034..5fa2ee91 100644 --- a/crates/teloxide/src/utils/html.rs +++ b/crates/teloxide/src/utils/html.rs @@ -101,7 +101,15 @@ pub fn code_inline(s: &str) -> String { #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ without using its output does nothing useful"] pub fn escape(s: &str) -> String { - s.replace('&', "&").replace('<', "<").replace('>', ">") + s.chars().fold(String::with_capacity(s.len()), |mut s, c| { + match c { + '&' => s.push_str("&"), + '<' => s.push_str("<"), + '>' => s.push_str(">"), + c => s.push(c), + } + s + }) } #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ diff --git a/crates/teloxide/src/utils/markdown.rs b/crates/teloxide/src/utils/markdown.rs index 4c0fa475..4d49707d 100644 --- a/crates/teloxide/src/utils/markdown.rs +++ b/crates/teloxide/src/utils/markdown.rs @@ -109,24 +109,17 @@ pub fn code_inline(s: &str) -> String { #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ without using its output does nothing useful"] pub fn escape(s: &str) -> String { - s.replace('_', r"\_") - .replace('*', r"\*") - .replace('[', r"\[") - .replace(']', r"\]") - .replace('(', r"\(") - .replace(')', r"\)") - .replace('~', r"\~") - .replace('`', r"\`") - .replace('>', r"\>") - .replace('#', r"\#") - .replace('+', r"\+") - .replace('-', r"\-") - .replace('=', r"\=") - .replace('|', r"\|") - .replace('{', r"\{") - .replace('}', r"\}") - .replace('.', r"\.") - .replace('!', r"\!") + const CHARS: [char; 18] = [ + '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!', + ]; + + s.chars().fold(String::with_capacity(s.len()), |mut s, c| { + if CHARS.contains(&c) { + s.push('\\'); + } + s.push(c); + s + }) } /// Escapes all markdown special characters specific for the inline link URL @@ -134,7 +127,13 @@ pub fn escape(s: &str) -> String { #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ without using its output does nothing useful"] pub fn escape_link_url(s: &str) -> String { - s.replace('`', r"\`").replace(')', r"\)") + s.chars().fold(String::with_capacity(s.len()), |mut s, c| { + if ['`', ')'].contains(&c) { + s.push('\\'); + } + s.push(c); + s + }) } /// Escapes all markdown special characters specific for the code block (``` and @@ -142,7 +141,13 @@ pub fn escape_link_url(s: &str) -> String { #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ without using its output does nothing useful"] pub fn escape_code(s: &str) -> String { - s.replace('\\', r"\\").replace('`', r"\`") + s.chars().fold(String::with_capacity(s.len()), |mut s, c| { + if ['`', '\\'].contains(&c) { + s.push('\\'); + } + s.push(c); + s + }) } #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ From 95ebe2a764e680696ae719c5560a94d4fcd2fe7d Mon Sep 17 00:00:00 2001 From: YouKnow Date: Wed, 3 Apr 2024 04:44:55 +0330 Subject: [PATCH 02/14] format the code --- crates/teloxide/src/utils/markdown.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/teloxide/src/utils/markdown.rs b/crates/teloxide/src/utils/markdown.rs index 4d49707d..ad6eb26c 100644 --- a/crates/teloxide/src/utils/markdown.rs +++ b/crates/teloxide/src/utils/markdown.rs @@ -109,9 +109,8 @@ pub fn code_inline(s: &str) -> String { #[must_use = "This function returns a new string, rather than mutating the argument, so calling it \ without using its output does nothing useful"] pub fn escape(s: &str) -> String { - const CHARS: [char; 18] = [ - '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!', - ]; + const CHARS: [char; 18] = + ['_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!']; s.chars().fold(String::with_capacity(s.len()), |mut s, c| { if CHARS.contains(&c) { From fd670041dcaf72c7abde6bef9c0deb4ad3f02eca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:54:36 +0000 Subject: [PATCH 03/14] Bump the lock group with 10 updates Bumps the lock group with 10 updates: | Package | From | To | | --- | --- | --- | | [pretty_env_logger](https://github.com/seanmonstar/pretty-env-logger) | `0.4.0` | `0.5.0` | | [bitflags](https://github.com/bitflags/bitflags) | `1.3.2` | `2.4.2` | | [aho-corasick](https://github.com/BurntSushi/aho-corasick) | `0.7.20` | `1.1.2` | | [itertools](https://github.com/rust-itertools/itertools) | `0.10.5` | `0.12.1` | | [syn](https://github.com/dtolnay/syn) | `1.0.109` | `2.0.52` | | [cc](https://github.com/rust-lang/cc-rs) | `1.0.90` | `1.0.91` | | [crc](https://github.com/mrhooray/crc-rs) | `3.0.1` | `3.2.0` | | [getrandom](https://github.com/rust-random/getrandom) | `0.2.12` | `0.2.13` | | [rustversion](https://github.com/dtolnay/rustversion) | `1.0.14` | `1.0.15` | | [security-framework](https://github.com/kornelski/rust-security-framework) | `2.9.2` | `2.10.0` | Updates `pretty_env_logger` from 0.4.0 to 0.5.0 - [Commits](https://github.com/seanmonstar/pretty-env-logger/compare/v0.4.0...v0.5.0) Updates `bitflags` from 1.3.2 to 2.4.2 - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.4.2) Updates `aho-corasick` from 0.7.20 to 1.1.2 - [Commits](https://github.com/BurntSushi/aho-corasick/compare/0.7.20...1.1.2) Updates `itertools` from 0.10.5 to 0.12.1 - [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.12.1) Updates `syn` from 1.0.109 to 2.0.52 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.109...2.0.52) Updates `cc` from 1.0.90 to 1.0.91 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.90...1.0.91) Updates `crc` from 3.0.1 to 3.2.0 - [Release notes](https://github.com/mrhooray/crc-rs/releases) - [Commits](https://github.com/mrhooray/crc-rs/compare/3.0.1...3.2.0) Updates `getrandom` from 0.2.12 to 0.2.13 - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.13) Updates `rustversion` from 1.0.14 to 1.0.15 - [Release notes](https://github.com/dtolnay/rustversion/releases) - [Commits](https://github.com/dtolnay/rustversion/compare/1.0.14...1.0.15) Updates `security-framework` from 2.9.2 to 2.10.0 - [Release notes](https://github.com/kornelski/rust-security-framework/releases) - [Commits](https://github.com/kornelski/rust-security-framework/compare/v2.9.2...v2.10.0) --- updated-dependencies: - dependency-name: pretty_env_logger dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: bitflags dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: aho-corasick dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: itertools dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: cc dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: crc dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: getrandom dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: rustversion dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: security-framework dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock ... Signed-off-by: dependabot[bot] --- Cargo.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7cabfb9e..3f633ea8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,9 +246,9 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "1fd97381a8cc6493395a5afc4c691c1084b3768db713b73aa215217aa245d153" [[package]] name = "cfg-if" @@ -326,9 +326,9 @@ dependencies = [ [[package]] name = "crc" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "c2b432c56615136f8dba245fed7ec3d5518c500a31108661067e61e72fe7e6bc" dependencies = [ "crc-catalog", ] @@ -672,9 +672,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "a06fddc2749e0528d2813f95e050e87e52c8cbbae56223b9babf73b3e53b0cc6" dependencies = [ "cfg-if", "libc", @@ -839,7 +839,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.6", "tokio", "tower-service", "tracing", @@ -1592,9 +1592,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "ryu" @@ -1629,9 +1629,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", From 618f468d991cae651b4050203c7a64bc47b417a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20H=C3=BCseyin=20Kafadar?= <43652059+mhkafadar@users.noreply.github.com> Date: Fri, 12 Apr 2024 19:58:08 +0300 Subject: [PATCH 04/14] fix: typo in errors.rs ToMuchMessages --- Cargo.lock | 129 +++++++++++++++++++++++++++++ crates/teloxide-core/src/errors.rs | 4 +- 2 files changed, 131 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f633ea8..8a063c1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -420,6 +420,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", + "subtle", ] [[package]] @@ -507,6 +508,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -519,6 +531,12 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + [[package]] name = "flume" version = "0.11.0" @@ -767,6 +785,33 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "http" version = "0.2.12" @@ -1059,6 +1104,16 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + [[package]] name = "memchr" version = "2.7.2" @@ -1820,6 +1875,7 @@ checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" dependencies = [ "sqlx-core", "sqlx-macros", + "sqlx-postgres", "sqlx-sqlite", ] @@ -1854,6 +1910,7 @@ dependencies = [ "rustls", "rustls-pemfile", "serde", + "serde_json", "sha2", "smallvec", "sqlformat", @@ -1895,6 +1952,7 @@ dependencies = [ "serde_json", "sha2", "sqlx-core", + "sqlx-postgres", "sqlx-sqlite", "syn 1.0.109", "tempfile", @@ -1902,6 +1960,44 @@ dependencies = [ "url", ] +[[package]] +name = "sqlx-postgres" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +dependencies = [ + "atoi", + "base64 0.21.7", + "bitflags 2.4.2", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + [[package]] name = "sqlx-sqlite" version = "0.7.4" @@ -1925,12 +2021,29 @@ dependencies = [ "urlencoding", ] +[[package]] +name = "stringprep" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +dependencies = [ + "finl_unicode", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + [[package]] name = "syn" version = "1.0.109" @@ -2403,6 +2516,12 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" version = "0.2.92" @@ -2498,6 +2617,16 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "whoami" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +dependencies = [ + "redox_syscall", + "wasite", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/crates/teloxide-core/src/errors.rs b/crates/teloxide-core/src/errors.rs index 8ba048dd..fc0d707b 100644 --- a/crates/teloxide-core/src/errors.rs +++ b/crates/teloxide-core/src/errors.rs @@ -289,7 +289,7 @@ impl_api_error! { /// 1. [`SendMediaGroup`] /// /// [`SendMediaGroup`]: crate::payloads::SendMediaGroup - ToMuchMessages = "Bad Request: Too much messages to send as an album", + TooMuchMessages = "Bad Request: Too much messages to send as an album", /// Occurs when bot tries to answer an inline query with more than 50 /// results. @@ -861,7 +861,7 @@ mod tests { ("{\"data\": \"Bad Request: MESSAGE_TOO_LONG\"}", ApiError::EditedMessageIsTooLong), ( "{\"data\": \"Bad Request: Too much messages to send as an album\"}", - ApiError::ToMuchMessages, + ApiError::TooMuchMessages, ), ("{\"data\": \"Bad Request: RESULTS_TOO_MUCH\"}", ApiError::TooMuchInlineQueryResults), ( From d673472fe0e81f08f6dfccf5ce3cf1e2fc0c208a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20H=C3=BCseyin=20Kafadar?= <43652059+mhkafadar@users.noreply.github.com> Date: Fri, 12 Apr 2024 20:11:20 +0300 Subject: [PATCH 05/14] refactor: revert changes to Cargo.lock --- Cargo.lock | 129 ----------------------------------------------------- 1 file changed, 129 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a063c1b..3f633ea8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -420,7 +420,6 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", - "subtle", ] [[package]] @@ -508,17 +507,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "etcetera" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" -dependencies = [ - "cfg-if", - "home", - "windows-sys 0.48.0", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -531,12 +519,6 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "flume" version = "0.11.0" @@ -785,33 +767,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "0.2.12" @@ -1104,16 +1059,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - [[package]] name = "memchr" version = "2.7.2" @@ -1875,7 +1820,6 @@ checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" dependencies = [ "sqlx-core", "sqlx-macros", - "sqlx-postgres", "sqlx-sqlite", ] @@ -1910,7 +1854,6 @@ dependencies = [ "rustls", "rustls-pemfile", "serde", - "serde_json", "sha2", "smallvec", "sqlformat", @@ -1952,7 +1895,6 @@ dependencies = [ "serde_json", "sha2", "sqlx-core", - "sqlx-postgres", "sqlx-sqlite", "syn 1.0.109", "tempfile", @@ -1960,44 +1902,6 @@ dependencies = [ "url", ] -[[package]] -name = "sqlx-postgres" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" -dependencies = [ - "atoi", - "base64 0.21.7", - "bitflags 2.4.2", - "byteorder", - "crc", - "dotenvy", - "etcetera", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "hex", - "hkdf", - "hmac", - "home", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "rand", - "serde", - "serde_json", - "sha2", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - [[package]] name = "sqlx-sqlite" version = "0.7.4" @@ -2021,29 +1925,12 @@ dependencies = [ "urlencoding", ] -[[package]] -name = "stringprep" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" -dependencies = [ - "finl_unicode", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - [[package]] name = "syn" version = "1.0.109" @@ -2516,12 +2403,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - [[package]] name = "wasm-bindgen" version = "0.2.92" @@ -2617,16 +2498,6 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" -[[package]] -name = "whoami" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" -dependencies = [ - "redox_syscall", - "wasite", -] - [[package]] name = "winapi" version = "0.3.9" From 1e67ad02121f275062d0083064059b6d86a57461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20H=C3=BCseyin=20Kafadar?= <43652059+mhkafadar@users.noreply.github.com> Date: Fri, 12 Apr 2024 20:16:36 +0300 Subject: [PATCH 06/14] chore: update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c05848..2ecbf1f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use `Seconds` instead of `String` in `InlineQueryResultAudio` for `audio_duration` ([PR 994](https://github.com/teloxide/teloxide/pull/994)) - High CPU usage on network errors ([PR 1002](https://github.com/teloxide/teloxide/pull/1002), [Issue 780](https://github.com/teloxide/teloxide/issues/780)) - Fix app build errors when using items gated behind sqlite-storage with the feature sqlite-storage-rustls ([PR 1018](https://github.com/teloxide/teloxide/pull/1018)) +- Fix typo in ApiError::ToMuchMessages enum ([PR 1046](https://github.com/teloxide/teloxide/pull/1046)) + ### Changed From 18db28e977cff28ebf40406e7cec8b0cd463dd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20H=C3=BCseyin=20Kafadar?= <43652059+mhkafadar@users.noreply.github.com> Date: Fri, 12 Apr 2024 20:17:15 +0300 Subject: [PATCH 07/14] chore: update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ecbf1f3..3817ba9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,7 +57,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix app build errors when using items gated behind sqlite-storage with the feature sqlite-storage-rustls ([PR 1018](https://github.com/teloxide/teloxide/pull/1018)) - Fix typo in ApiError::ToMuchMessages enum ([PR 1046](https://github.com/teloxide/teloxide/pull/1046)) - ### Changed - MSRV (Minimal Supported Rust Version) was bumped from `1.64.0` to `1.68.0` ([PR 950][https://github.com/teloxide/teloxide/pull/950]) From f24d091853778c048fe15426b374ad914ef5bbc3 Mon Sep 17 00:00:00 2001 From: Waffle Maybe Date: Fri, 12 Apr 2024 19:20:34 +0200 Subject: [PATCH 08/14] change changelog entry style a bit --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3817ba9f..815102c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,7 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use `Seconds` instead of `String` in `InlineQueryResultAudio` for `audio_duration` ([PR 994](https://github.com/teloxide/teloxide/pull/994)) - High CPU usage on network errors ([PR 1002](https://github.com/teloxide/teloxide/pull/1002), [Issue 780](https://github.com/teloxide/teloxide/issues/780)) - Fix app build errors when using items gated behind sqlite-storage with the feature sqlite-storage-rustls ([PR 1018](https://github.com/teloxide/teloxide/pull/1018)) -- Fix typo in ApiError::ToMuchMessages enum ([PR 1046](https://github.com/teloxide/teloxide/pull/1046)) +- Fix typo in `ApiError::ToMuchMessages` variant (rename it to `TooMuchMessages`) ([PR 1046](https://github.com/teloxide/teloxide/pull/1046)) ### Changed From cf7a0bc48c62673cc58e61a2df056bee1862542f Mon Sep 17 00:00:00 2001 From: Tima Kinsart Date: Wed, 17 Apr 2024 23:27:20 +0500 Subject: [PATCH 09/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1426397c..e0d4dcb0 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,7 @@ Feel free to propose your own bot to our collection! -See [700+ other public repositories using `teloxide` >>](https://github.com/teloxide/teloxide/network/dependents) +See [1600+ other public repositories using `teloxide` >>](https://github.com/teloxide/teloxide/network/dependents) ## Contributing From 8c32c6fb1303f6ee363006448345f772183efbc2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:56:47 +0000 Subject: [PATCH 10/14] Bump rustls from 0.21.10 to 0.21.11 Bumps [rustls](https://github.com/rustls/rustls) from 0.21.10 to 0.21.11. - [Release notes](https://github.com/rustls/rustls/releases) - [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md) - [Commits](https://github.com/rustls/rustls/compare/v/0.21.10...v/0.21.11) --- updated-dependencies: - dependency-name: rustls dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 131 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f633ea8..ac559433 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -420,6 +420,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", + "subtle", ] [[package]] @@ -507,6 +508,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -519,6 +531,12 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + [[package]] name = "flume" version = "0.11.0" @@ -767,6 +785,33 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "http" version = "0.2.12" @@ -1059,6 +1104,16 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + [[package]] name = "memchr" version = "2.7.2" @@ -1561,9 +1616,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", "ring", @@ -1820,6 +1875,7 @@ checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" dependencies = [ "sqlx-core", "sqlx-macros", + "sqlx-postgres", "sqlx-sqlite", ] @@ -1854,6 +1910,7 @@ dependencies = [ "rustls", "rustls-pemfile", "serde", + "serde_json", "sha2", "smallvec", "sqlformat", @@ -1895,6 +1952,7 @@ dependencies = [ "serde_json", "sha2", "sqlx-core", + "sqlx-postgres", "sqlx-sqlite", "syn 1.0.109", "tempfile", @@ -1902,6 +1960,44 @@ dependencies = [ "url", ] +[[package]] +name = "sqlx-postgres" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +dependencies = [ + "atoi", + "base64 0.21.7", + "bitflags 2.4.2", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + [[package]] name = "sqlx-sqlite" version = "0.7.4" @@ -1925,12 +2021,29 @@ dependencies = [ "urlencoding", ] +[[package]] +name = "stringprep" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +dependencies = [ + "finl_unicode", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + [[package]] name = "syn" version = "1.0.109" @@ -2403,6 +2516,12 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" version = "0.2.92" @@ -2498,6 +2617,16 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "whoami" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +dependencies = [ + "redox_syscall", + "wasite", +] + [[package]] name = "winapi" version = "0.3.9" From 309986301f452a232c678530055bd1c7b28ed9f0 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Tue, 25 Jun 2024 20:19:38 +0500 Subject: [PATCH 11/14] Update nightly --- .github/workflows/ci.yml | 4 +- crates/teloxide-core/Cargo.toml | 3 + crates/teloxide-core/src/codegen.rs | 6 +- crates/teloxide-core/src/codegen/convert.rs | 1 + crates/teloxide-core/src/types/chat_member.rs | 7 ++ crates/teloxide-core/src/types/message.rs | 21 +++-- crates/teloxide/Cargo.toml | 6 ++ crates/teloxide/src/dispatching.rs | 3 +- .../dialogue/storage/postgres_storage.rs | 5 +- .../dialogue/storage/redis_storage.rs | 2 +- .../teloxide/src/dispatching/handler_ext.rs | 8 +- crates/teloxide/src/utils/command.rs | 76 +++++++++---------- rust-toolchain.toml | 2 +- 13 files changed, 78 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32d8f443..9fab6bea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ env: # - crates/teloxide-core/src/codegen.rs # - rust-toolchain.toml # - below in the test matrix - rust_nightly: nightly-2024-03-20 + rust_nightly: nightly-2024-07-03 # When updating this, also update: # - **/README.md # - **/src/lib.rs @@ -105,7 +105,7 @@ jobs: toolchain: beta features: "--features full" - rust: nightly - toolchain: nightly-2024-03-20 + toolchain: nightly-2024-07-03 features: "--features full nightly" - rust: msrv toolchain: 1.70.0 diff --git a/crates/teloxide-core/Cargo.toml b/crates/teloxide-core/Cargo.toml index c2cb2ac2..669abaea 100644 --- a/crates/teloxide-core/Cargo.toml +++ b/crates/teloxide-core/Cargo.toml @@ -112,6 +112,9 @@ pre-release-replacements = [ { file = "CHANGELOG.md", search = "## unreleased", replace = "## unreleased\n\n## {{version}} - {{date}}", exactly = 1 }, ] +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(dep_docsrs)'] } + [[example]] name = "self_info" required-features = ["tokio/macros", "tokio/rt-multi-thread"] diff --git a/crates/teloxide-core/src/codegen.rs b/crates/teloxide-core/src/codegen.rs index 316b5436..36f0c1f2 100644 --- a/crates/teloxide-core/src/codegen.rs +++ b/crates/teloxide-core/src/codegen.rs @@ -23,7 +23,7 @@ use xshell::{cmd, Shell}; fn ensure_rustfmt(sh: &Shell) { // FIXME(waffle): find a better way to set toolchain - let toolchain = "nightly-2024-03-20"; + let toolchain = "nightly-2024-07-03"; let version = cmd!(sh, "rustup run {toolchain} rustfmt --version").read().unwrap_or_default(); @@ -36,7 +36,7 @@ fn ensure_rustfmt(sh: &Shell) { } pub fn reformat(text: String) -> String { - let toolchain = "nightly-2024-03-20"; + let toolchain = "nightly-2024-07-03"; let sh = Shell::new().unwrap(); ensure_rustfmt(&sh); @@ -89,7 +89,7 @@ pub fn ensure_files_contents<'a>( err_count += 1; - let display_path = path.strip_prefix(&project_root()).unwrap_or(path); + let display_path = path.strip_prefix(project_root()).unwrap_or(path); eprintln!( "\n\x1b[31;1merror\x1b[0m: {} was not up-to-date, updating\n", display_path.display() diff --git a/crates/teloxide-core/src/codegen/convert.rs b/crates/teloxide-core/src/codegen/convert.rs index a31b3e88..1e368b26 100644 --- a/crates/teloxide-core/src/codegen/convert.rs +++ b/crates/teloxide-core/src/codegen/convert.rs @@ -1,6 +1,7 @@ use crate::codegen::schema::Type; pub enum Convert { + #[allow(dead_code)] Id(Type), Into(Type), Collect(Type), diff --git a/crates/teloxide-core/src/types/chat_member.rs b/crates/teloxide-core/src/types/chat_member.rs index 715e8d53..23328ea7 100644 --- a/crates/teloxide-core/src/types/chat_member.rs +++ b/crates/teloxide-core/src/types/chat_member.rs @@ -361,6 +361,7 @@ impl ChatMemberKind { /// - is the owner of the chat /// - is an administrator in the given chat and has [`can_manage_chat`] /// privilege. + /// /// Returns `false` otherwise. /// /// [`can_manage_chat`]: Administrator::can_manage_chat @@ -379,6 +380,7 @@ impl ChatMemberKind { /// - is the owner of the chat (even if the chat is not a channel) /// - is an administrator in the given chat and has [`can_post_messages`] /// privilege. + /// /// Returns `false` otherwise. /// /// [`can_post_messages`]: Administrator::can_post_messages @@ -398,6 +400,7 @@ impl ChatMemberKind { /// - is the owner of the chat (even if the chat is not a channel) /// - is an administrator in the given chat and has the /// [`can_edit_messages`] privilege. + /// /// Returns `false` otherwise. /// /// [`can_edit_messages`]: Administrator::can_edit_messages @@ -416,6 +419,7 @@ impl ChatMemberKind { /// - is the owner of the chat /// - is an administrator in the given chat and has the /// [`can_delete_messages`] privilege. + /// /// Returns `false` otherwise. /// /// [`can_delete_messages`]: Administrator::can_delete_messages @@ -434,6 +438,7 @@ impl ChatMemberKind { /// - is the owner of the chat /// - is an administrator in the given chat and has the /// [`can_manage_video_chats`] privilege. + /// /// Returns `false` otherwise. /// /// [`can_manage_video_chats`]: Administrator::can_manage_video_chats @@ -454,6 +459,7 @@ impl ChatMemberKind { /// - is the owner of the chat /// - is an administrator in the given chat and has the /// [`can_restrict_members`] privilege. + /// /// Returns `false` otherwise. /// /// [`can_restrict_members`]: Administrator::can_restrict_members @@ -477,6 +483,7 @@ impl ChatMemberKind { /// - is the owner of the chat (even if the chat is not a channel) /// - is an administrator in the given chat and has the /// [`can_promote_members`] privilege. + /// /// Returns `false` otherwise. /// /// [`can_promote_members`]: Administrator::can_promote_members diff --git a/crates/teloxide-core/src/types/message.rs b/crates/teloxide-core/src/types/message.rs index e2de607f..7df5e3d7 100644 --- a/crates/teloxide-core/src/types/message.rs +++ b/crates/teloxide-core/src/types/message.rs @@ -1009,17 +1009,16 @@ mod getters { #[must_use] pub fn caption(&self) -> Option<&str> { match &self.kind { - Common(MessageCommon { media_kind, .. }) => match media_kind { - MediaKind::Animation(MediaAnimation { caption, .. }) - | MediaKind::Audio(MediaAudio { caption, .. }) - | MediaKind::Document(MediaDocument { caption, .. }) - | MediaKind::Photo(MediaPhoto { caption, .. }) - | MediaKind::Video(MediaVideo { caption, .. }) - | MediaKind::Voice(MediaVoice { caption, .. }) => { - caption.as_ref().map(Deref::deref) - } - _ => None, - }, + Common(MessageCommon { + media_kind: + MediaKind::Animation(MediaAnimation { caption, .. }) + | MediaKind::Audio(MediaAudio { caption, .. }) + | MediaKind::Document(MediaDocument { caption, .. }) + | MediaKind::Photo(MediaPhoto { caption, .. }) + | MediaKind::Video(MediaVideo { caption, .. }) + | MediaKind::Voice(MediaVoice { caption, .. }), + .. + }) => caption.as_ref().map(Deref::deref), _ => None, } } diff --git a/crates/teloxide/Cargo.toml b/crates/teloxide/Cargo.toml index 8d26b8a5..823d4099 100644 --- a/crates/teloxide/Cargo.toml +++ b/crates/teloxide/Cargo.toml @@ -165,6 +165,12 @@ name = "postgres" path = "tests/postgres.rs" required-features = ["postgres-storage-nativetls", "cbor-serializer", "bincode-serializer"] +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(CI_POSTGRES)', + 'cfg(CI_REDIS)', +] } + [[example]] name = "admin" required-features = ["macros", "ctrlc_handler"] diff --git a/crates/teloxide/src/dispatching.rs b/crates/teloxide/src/dispatching.rs index 5c048e23..1caa197b 100644 --- a/crates/teloxide/src/dispatching.rs +++ b/crates/teloxide/src/dispatching.rs @@ -91,8 +91,7 @@ //! several techniques: //! //! - **Branching:** `a.branch(b)` roughly means "try to handle an update with -//! `a`, then, if it -//! neglects the update, try `b`". +//! `a`, then, if it neglects the update, try `b`". //! - **Pattern matching:** We also use the [`dptree::case!`] macro //! extensively, which acts as a filter on an enumeration: if it is of a //! certain variant, it passes the variant's payload down the handler chain; diff --git a/crates/teloxide/src/dispatching/dialogue/storage/postgres_storage.rs b/crates/teloxide/src/dispatching/dialogue/storage/postgres_storage.rs index ceb4f2a8..f5f78a42 100644 --- a/crates/teloxide/src/dispatching/dialogue/storage/postgres_storage.rs +++ b/crates/teloxide/src/dispatching/dialogue/storage/postgres_storage.rs @@ -44,9 +44,8 @@ impl PostgresStorage { /// - database_url: full url to the postgres database, for example /// `"postgres://postgres:password@localhost/test")` /// - max_connections: number of connections in creating connection pool. Be - /// mindful of the connection limits for your database, each - /// connection established with the Postgres creates a new process on the - /// server side + /// mindful of the connection limits for your database, each connection + /// established with the Postgres creates a new process on the server side /// - serializer: what [`Serializer`] will be used to encode the dialogue /// data. Available ones are: [`Json`], [`Bincode`], [`Cbor`] /// diff --git a/crates/teloxide/src/dispatching/dialogue/storage/redis_storage.rs b/crates/teloxide/src/dispatching/dialogue/storage/redis_storage.rs index de9294d8..b5919d2f 100644 --- a/crates/teloxide/src/dispatching/dialogue/storage/redis_storage.rs +++ b/crates/teloxide/src/dispatching/dialogue/storage/redis_storage.rs @@ -89,7 +89,7 @@ where Box::pin(async move { let dialogue = self.serializer.serialize(&dialogue).map_err(RedisStorageError::SerdeError)?; - self.conn.lock().await.set::<_, Vec, _>(chat_id, dialogue).await?; + () = self.conn.lock().await.set::<_, Vec, _>(chat_id, dialogue).await?; Ok(()) }) } diff --git a/crates/teloxide/src/dispatching/handler_ext.rs b/crates/teloxide/src/dispatching/handler_ext.rs index 0013acb4..f5f3236d 100644 --- a/crates/teloxide/src/dispatching/handler_ext.rs +++ b/crates/teloxide/src/dispatching/handler_ext.rs @@ -28,11 +28,11 @@ pub trait HandlerExt { /// It does so by the following steps: /// /// 1. If an incoming update has no chat ID ([`GetChatId::chat_id`] returns - /// `None`), the rest of the chain will not be executed. Otherwise, passes - /// `Dialogue::new(storage, chat_id)` forwards. + /// `None`), the rest of the chain will not be executed. Otherwise, + /// passes `Dialogue::new(storage, chat_id)` forwards. /// 2. If [`Dialogue::get_or_default`] on the passed dialogue returns `Ok`, - /// passes the dialogue state forwards. Otherwise, logs an error and the - /// rest of the chain is not executed. + /// passes the dialogue state forwards. Otherwise, logs an error and the + /// rest of the chain is not executed. /// /// ## Dependency requirements /// diff --git a/crates/teloxide/src/utils/command.rs b/crates/teloxide/src/utils/command.rs index ab85f893..0dce838a 100644 --- a/crates/teloxide/src/utils/command.rs +++ b/crates/teloxide/src/utils/command.rs @@ -81,22 +81,22 @@ pub use teloxide_macros::BotCommands; /// ``` /// /// # Enum attributes -/// 1. `#[command(rename_rule = "rule")]` -/// Rename all commands by `rule`. Allowed rules are `lowercase`, `UPPERCASE`, -/// `PascalCase`, `camelCase`, `snake_case`, `SCREAMING_SNAKE_CASE`, -/// `kebab-case`, and `SCREAMING-KEBAB-CASE`. +/// 1. `#[command(rename_rule = "rule")]` Rename all commands by `rule`. +/// Allowed rules are `lowercase`, `UPPERCASE`, `PascalCase`, `camelCase`, +/// `snake_case`, `SCREAMING_SNAKE_CASE`, `kebab-case`, and +/// `SCREAMING-KEBAB-CASE`. /// -/// 2. `#[command(prefix = "prefix")]` -/// Change a prefix for all commands (the default is `/`). +/// 2. `#[command(prefix = "prefix")]` Change a prefix for all commands (the +/// default is `/`). /// -/// 3. `#[command(description = "description")]` and `/// description` -/// Add a summary description of commands before all commands. +/// 3. `#[command(description = "description")]` and `/// description` Add a +/// summary description of commands before all commands. /// -/// 4. `#[command(parse_with = "parser")]` -/// Change the parser of arguments. Possible values: -/// - `default` - the same as the unspecified parser. It only puts all text -/// after the first space into the first argument, which must implement -/// [`FromStr`]. +/// 4. `#[command(parse_with = "parser")]` Change the parser of arguments. +/// Possible values: +/// - `default` - the same as the unspecified parser. It only puts all +/// text after the first space into the first argument, which must +/// implement [`FromStr`]. /// /// ## Example /// ``` @@ -134,9 +134,8 @@ pub use teloxide_macros::BotCommands; /// # } /// ``` /// -/// 5. `#[command(separator = "sep")]` -/// Specify separator used by the `split` parser. It will be ignored when -/// accompanied by another type of parsers. +/// 5. `#[command(separator = "sep")]` Specify separator used by the `split` +/// parser. It will be ignored when accompanied by another type of parsers. /// /// ## Example /// ``` @@ -154,8 +153,8 @@ pub use teloxide_macros::BotCommands; /// # } /// ``` /// -/// 6. `#[command(command_separator = "sep")]` -/// Specify separator between command and args. Default is a space character. +/// 6. `#[command(command_separator = "sep")]` Specify separator between command +/// and args. Default is a space character. /// /// ## Example /// ``` @@ -181,34 +180,33 @@ pub use teloxide_macros::BotCommands; /// # Variant attributes /// All variant attributes override the corresponding `enum` attributes. /// -/// 1. `#[command(rename_rule = "rule")]` -/// Rename one command by a rule. Allowed rules are `lowercase`, `UPPERCASE`, -/// `PascalCase`, `camelCase`, `snake_case`, `SCREAMING_SNAKE_CASE`, -/// `kebab-case`, `SCREAMING-KEBAB-CASE`. +/// 1. `#[command(rename_rule = "rule")]` Rename one command by a rule. Allowed +/// rules are `lowercase`, `UPPERCASE`, `PascalCase`, `camelCase`, +/// `snake_case`, `SCREAMING_SNAKE_CASE`, `kebab-case`, +/// `SCREAMING-KEBAB-CASE`. /// -/// 2. `#[command(rename = "name")]` -/// Rename one command to `name` (literal renaming; do not confuse with -/// `rename_rule`). +/// 2. `#[command(rename = "name")]` Rename one command to `name` (literal +/// renaming; do not confuse with `rename_rule`). /// -/// 3. `#[command(description = "description")]` and `/// description` -/// Give your command a description. It will be shown in the help message. +/// 3. `#[command(description = "description")]` and `/// description` Give +/// your command a description. It will be shown in the help message. /// -/// 4. `#[command(parse_with = "parser")]` -/// Parse arguments of one command with a given parser. `parser` must be a -/// function of the signature `fn(String) -> Result`, where -/// `Tuple` corresponds to the variant's arguments. +/// 4. `#[command(parse_with = "parser")]` Parse arguments of one command with +/// a given parser. `parser` must be a function of the signature `fn(String) +/// -> Result`, where `Tuple` corresponds to the +/// variant's arguments. /// -/// 5. `#[command(hide)]` -/// Hide a command from the help message. It will still be parsed. +/// 5. `#[command(hide)]` Hide a command from the help message. It will still +/// be parsed. /// -/// 6. `#[command(alias = "alias")]` -/// Add an alias to a command. It will be shown in the help message. +/// 6. `#[command(alias = "alias")]` Add an alias to a command. It will be shown +/// in the help message. /// -/// 7. `#[command(aliases = ["alias1", "alias2"])]` -/// Add multiple aliases to a command. They will be shown in the help message. +/// 7. `#[command(aliases = ["alias1", "alias2"])]` Add multiple aliases to a +/// command. They will be shown in the help message. /// -/// 8. `#[command(hide_aliases)]` -/// Hide all aliases of a command from the help message. +/// 8. `#[command(hide_aliases)]` Hide all aliases of a command from the help +/// message. /// /// ## Example /// ``` diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d07466f2..43651f30 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2024-03-20" +channel = "nightly-2024-07-03" components = ["rustfmt", "clippy"] profile = "minimal" From 345107d279f6e3b71e72e1060eeaa115ce4d8377 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 18:26:49 +0000 Subject: [PATCH 12/14] Bump the lock group across 1 directory with 70 updates Bumps the lock group with 61 updates in the / directory: | Package | From | To | | --- | --- | --- | | [serde_json](https://github.com/serde-rs/json) | `1.0.115` | `1.0.120` | | [serde](https://github.com/serde-rs/serde) | `1.0.197` | `1.0.203` | | [tokio](https://github.com/tokio-rs/tokio) | `1.37.0` | `1.38.0` | | [tokio-util](https://github.com/tokio-rs/tokio) | `0.7.10` | `0.7.11` | | [url](https://github.com/servo/rust-url) | `2.5.0` | `2.5.2` | | [log](https://github.com/rust-lang/log) | `0.4.21` | `0.4.22` | | [derive_more](https://github.com/JelteF/derive_more) | `0.99.17` | `0.99.18` | | [thiserror](https://github.com/dtolnay/thiserror) | `1.0.58` | `1.0.61` | | [either](https://github.com/rayon-rs/either) | `1.10.0` | `1.13.0` | | [pretty_env_logger](https://github.com/seanmonstar/pretty-env-logger) | `0.4.0` | `0.5.0` | | [chrono](https://github.com/chronotope/chrono) | `0.4.37` | `0.4.38` | | [uuid](https://github.com/uuid-rs/uuid) | `1.8.0` | `1.9.1` | | [bitflags](https://github.com/bitflags/bitflags) | `1.3.2` | `2.4.2` | | [aho-corasick](https://github.com/BurntSushi/aho-corasick) | `0.7.20` | `1.1.2` | | [itertools](https://github.com/rust-itertools/itertools) | `0.10.5` | `0.12.1` | | [quote](https://github.com/dtolnay/quote) | `1.0.35` | `1.0.36` | | [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.79` | `1.0.86` | | [syn](https://github.com/dtolnay/syn) | `1.0.109` | `2.0.52` | | [allocator-api2](https://github.com/zakarumych/allocator-api2) | `0.2.16` | `0.2.18` | | [async-trait](https://github.com/dtolnay/async-trait) | `0.1.79` | `0.1.80` | | [autocfg](https://github.com/cuviper/autocfg) | `1.2.0` | `1.3.0` | | [backtrace](https://github.com/rust-lang/backtrace-rs) | `0.3.71` | `0.3.73` | | [bumpalo](https://github.com/fitzgen/bumpalo) | `3.15.4` | `3.16.0` | | [combine](https://github.com/Marwes/combine) | `4.6.6` | `4.6.7` | | [crc](https://github.com/mrhooray/crc-rs) | `3.2.0` | `3.2.1` | | [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) | `0.8.19` | `0.8.20` | | [encoding_rs](https://github.com/hsivonen/encoding_rs) | `0.8.33` | `0.8.34` | | [errno](https://github.com/lambda-fairy/rust-errno) | `0.3.8` | `0.3.9` | | [fastrand](https://github.com/smol-rs/fastrand) | `2.0.2` | `2.1.0` | | [getrandom](https://github.com/rust-random/getrandom) | `0.2.13` | `0.2.14` | | [httparse](https://github.com/seanmonstar/httparse) | `1.8.0` | `1.9.4` | | [hyper](https://github.com/hyperium/hyper) | `0.14.28` | `0.14.29` | | [include_dir](https://github.com/Michael-F-Bryan/include_dir) | `0.7.3` | `0.7.4` | | [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) | `1.4.0` | `1.5.0` | | [libc](https://github.com/rust-lang/libc) | `0.2.153` | `0.2.155` | | [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | `0.4.13` | `0.4.14` | | [lock_api](https://github.com/Amanieu/parking_lot) | `0.4.11` | `0.4.12` | | [memchr](https://github.com/BurntSushi/memchr) | `2.7.2` | `2.7.4` | | [mime_guess](https://github.com/abonander/mime_guess) | `2.0.4` | `2.0.5` | | [miniz_oxide](https://github.com/Frommi/miniz_oxide) | `0.7.2` | `0.7.4` | | [native-tls](https://github.com/sfackler/rust-native-tls) | `0.2.11` | `0.2.12` | | [num-traits](https://github.com/rust-num/num-traits) | `0.2.18` | `0.2.19` | | [parking_lot](https://github.com/Amanieu/parking_lot) | `0.12.1` | `0.12.3` | | [parking_lot_core](https://github.com/Amanieu/parking_lot) | `0.9.9` | `0.9.10` | | [paste](https://github.com/dtolnay/paste) | `1.0.14` | `1.0.15` | | [regex](https://github.com/rust-lang/regex) | `1.10.4` | `1.10.5` | | [regex-automata](https://github.com/rust-lang/regex) | `0.4.6` | `0.4.7` | | [regex-syntax](https://github.com/rust-lang/regex) | `0.8.3` | `0.8.4` | | [rustix](https://github.com/bytecodealliance/rustix) | `0.38.32` | `0.38.34` | | [rustls](https://github.com/rustls/rustls) | `0.21.11` | `0.21.12` | | [rustversion](https://github.com/dtolnay/rustversion) | `1.0.15` | `1.0.17` | | [ryu](https://github.com/dtolnay/ryu) | `1.0.17` | `1.0.18` | | [security-framework-sys](https://github.com/kornelski/rust-security-framework) | `2.10.0` | `2.11.0` | | [semver](https://github.com/dtolnay/semver) | `1.0.22` | `1.0.23` | | [signal-hook-registry](https://github.com/vorner/signal-hook) | `1.4.1` | `1.4.2` | | [sqlformat](https://github.com/shssoichiro/sqlformat-rs) | `0.2.3` | `0.2.4` | | [stringprep](https://github.com/sfackler/rust-stringprep) | `0.1.4` | `0.1.5` | | [subtle](https://github.com/dalek-cryptography/subtle) | `2.5.0` | `2.6.1` | | [tinyvec](https://github.com/Lokathor/tinyvec) | `1.6.0` | `1.6.1` | | [winapi-util](https://github.com/BurntSushi/winapi-util) | `0.1.6` | `0.1.8` | | [zerocopy](https://github.com/google/zerocopy) | `0.7.32` | `0.7.35` | Updates `serde_json` from 1.0.115 to 1.0.120 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.120) Updates `serde` from 1.0.197 to 1.0.203 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.203) Updates `tokio` from 1.37.0 to 1.38.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0) Updates `tokio-util` from 0.7.10 to 0.7.11 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.10...tokio-util-0.7.11) Updates `url` from 2.5.0 to 2.5.2 - [Release notes](https://github.com/servo/rust-url/releases) - [Commits](https://github.com/servo/rust-url/compare/v2.5.0...v2.5.2) Updates `log` from 0.4.21 to 0.4.22 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.21...0.4.22) Updates `derive_more` from 0.99.17 to 0.99.18 - [Release notes](https://github.com/JelteF/derive_more/releases) - [Changelog](https://github.com/JelteF/derive_more/blob/v0.99.18/CHANGELOG.md) - [Commits](https://github.com/JelteF/derive_more/compare/v0.99.17...v0.99.18) Updates `thiserror` from 1.0.58 to 1.0.61 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.61) Updates `either` from 1.10.0 to 1.13.0 - [Commits](https://github.com/rayon-rs/either/compare/1.10.0...1.13.0) Updates `pretty_env_logger` from 0.4.0 to 0.5.0 - [Commits](https://github.com/seanmonstar/pretty-env-logger/compare/v0.4.0...v0.5.0) Updates `chrono` from 0.4.37 to 0.4.38 - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.37...v0.4.38) Updates `uuid` from 1.8.0 to 1.9.1 - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.8.0...1.9.1) Updates `bitflags` from 1.3.2 to 2.4.2 - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.4.2) Updates `aho-corasick` from 0.7.20 to 1.1.2 - [Commits](https://github.com/BurntSushi/aho-corasick/compare/0.7.20...1.1.2) Updates `itertools` from 0.10.5 to 0.12.1 - [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.12.1) Updates `quote` from 1.0.35 to 1.0.36 - [Release notes](https://github.com/dtolnay/quote/releases) - [Commits](https://github.com/dtolnay/quote/compare/1.0.35...1.0.36) Updates `proc-macro2` from 1.0.79 to 1.0.86 - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.79...1.0.86) Updates `syn` from 1.0.109 to 2.0.52 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.109...2.0.52) Updates `allocator-api2` from 0.2.16 to 0.2.18 - [Changelog](https://github.com/zakarumych/allocator-api2/blob/main/CHANGELOG.md) - [Commits](https://github.com/zakarumych/allocator-api2/compare/v0.2.16...v0.2.18) Updates `async-trait` from 0.1.79 to 0.1.80 - [Release notes](https://github.com/dtolnay/async-trait/releases) - [Commits](https://github.com/dtolnay/async-trait/compare/0.1.79...0.1.80) Updates `autocfg` from 1.2.0 to 1.3.0 - [Commits](https://github.com/cuviper/autocfg/compare/1.2.0...1.3.0) Updates `backtrace` from 0.3.71 to 0.3.73 - [Release notes](https://github.com/rust-lang/backtrace-rs/releases) - [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.71...0.3.73) Updates `bumpalo` from 3.15.4 to 3.16.0 - [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md) - [Commits](https://github.com/fitzgen/bumpalo/compare/3.15.4...3.16.0) Updates `cc` from 1.0.91 to 1.0.104 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.91...cc-v1.0.104) Updates `combine` from 4.6.6 to 4.6.7 - [Changelog](https://github.com/Marwes/combine/blob/master/CHANGELOG.md) - [Commits](https://github.com/Marwes/combine/compare/v4.6.6...v4.6.7) Updates `crc` from 3.2.0 to 3.2.1 - [Release notes](https://github.com/mrhooray/crc-rs/releases) - [Commits](https://github.com/mrhooray/crc-rs/compare/3.2.0...3.2.1) Updates `crossbeam-utils` from 0.8.19 to 0.8.20 - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.19...crossbeam-utils-0.8.20) Updates `encoding_rs` from 0.8.33 to 0.8.34 - [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.33...v0.8.34) Updates `errno` from 0.3.8 to 0.3.9 - [Changelog](https://github.com/lambda-fairy/rust-errno/blob/main/CHANGELOG.md) - [Commits](https://github.com/lambda-fairy/rust-errno/commits) Updates `fastrand` from 2.0.2 to 2.1.0 - [Release notes](https://github.com/smol-rs/fastrand/releases) - [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md) - [Commits](https://github.com/smol-rs/fastrand/compare/v2.0.2...v2.1.0) Updates `getrandom` from 0.2.13 to 0.2.14 - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/getrandom/compare/v0.2.13...v0.2.14) Updates `gimli` from 0.28.1 to 0.29.0 - [Changelog](https://github.com/gimli-rs/gimli/blob/master/CHANGELOG.md) - [Commits](https://github.com/gimli-rs/gimli/compare/0.28.1...0.29.0) Updates `httparse` from 1.8.0 to 1.9.4 - [Release notes](https://github.com/seanmonstar/httparse/releases) - [Commits](https://github.com/seanmonstar/httparse/compare/v1.8.0...v1.9.4) Updates `hyper` from 0.14.28 to 0.14.29 - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/v0.14.29/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.14.28...v0.14.29) Updates `include_dir` from 0.7.3 to 0.7.4 - [Commits](https://github.com/Michael-F-Bryan/include_dir/compare/include_dir-v0.7.3...include_dir-v0.7.4) Updates `include_dir_macros` from 0.7.3 to 0.7.4 - [Commits](https://github.com/Michael-F-Bryan/include_dir/compare/include_dir_macros-v0.7.3...include_dir_macros-v0.7.4) Updates `lazy_static` from 1.4.0 to 1.5.0 - [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases) - [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.4.0...1.5.0) Updates `libc` from 0.2.153 to 0.2.155 - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.153...0.2.155) Updates `linux-raw-sys` from 0.4.13 to 0.4.14 - [Commits](https://github.com/sunfishcode/linux-raw-sys/compare/v0.4.13...v0.4.14) Updates `lock_api` from 0.4.11 to 0.4.12 - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md) - [Commits](https://github.com/Amanieu/parking_lot/compare/lock_api-0.4.11...lock_api-0.4.12) Updates `memchr` from 2.7.2 to 2.7.4 - [Commits](https://github.com/BurntSushi/memchr/compare/2.7.2...2.7.4) Updates `mime_guess` from 2.0.4 to 2.0.5 - [Commits](https://github.com/abonander/mime_guess/commits) Updates `miniz_oxide` from 0.7.2 to 0.7.4 - [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md) - [Commits](https://github.com/Frommi/miniz_oxide/commits) Updates `native-tls` from 0.2.11 to 0.2.12 - [Release notes](https://github.com/sfackler/rust-native-tls/releases) - [Changelog](https://github.com/sfackler/rust-native-tls/blob/master/CHANGELOG.md) - [Commits](https://github.com/sfackler/rust-native-tls/compare/v0.2.11...v0.2.12) Updates `num-traits` from 0.2.18 to 0.2.19 - [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md) - [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.18...num-traits-0.2.19) Updates `object` from 0.32.2 to 0.36.1 - [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md) - [Commits](https://github.com/gimli-rs/object/compare/0.32.2...0.36.1) Updates `parking_lot` from 0.12.1 to 0.12.3 - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md) - [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.3) Updates `parking_lot_core` from 0.9.9 to 0.9.10 - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md) - [Commits](https://github.com/Amanieu/parking_lot/compare/core-0.9.9...core-0.9.10) Updates `paste` from 1.0.14 to 1.0.15 - [Release notes](https://github.com/dtolnay/paste/releases) - [Commits](https://github.com/dtolnay/paste/compare/1.0.14...1.0.15) Updates `regex` from 1.10.4 to 1.10.5 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5) Updates `regex-automata` from 0.4.6 to 0.4.7 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/regex-automata-0.4.6...regex-automata-0.4.7) Updates `regex-syntax` from 0.8.3 to 0.8.4 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/regex-syntax-0.8.3...regex-syntax-0.8.4) Updates `rustc-demangle` from 0.1.23 to 0.1.24 - [Commits](https://github.com/rust-lang/rustc-demangle/compare/0.1.23...0.1.24) Updates `rustix` from 0.38.32 to 0.38.34 - [Release notes](https://github.com/bytecodealliance/rustix/releases) - [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.32...v0.38.34) Updates `rustls` from 0.21.11 to 0.21.12 - [Release notes](https://github.com/rustls/rustls/releases) - [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md) - [Commits](https://github.com/rustls/rustls/compare/v/0.21.11...v/0.21.12) Updates `rustversion` from 1.0.15 to 1.0.17 - [Release notes](https://github.com/dtolnay/rustversion/releases) - [Commits](https://github.com/dtolnay/rustversion/compare/1.0.15...1.0.17) Updates `ryu` from 1.0.17 to 1.0.18 - [Release notes](https://github.com/dtolnay/ryu/releases) - [Commits](https://github.com/dtolnay/ryu/compare/1.0.17...1.0.18) Updates `security-framework-sys` from 2.10.0 to 2.11.0 - [Release notes](https://github.com/kornelski/rust-security-framework/releases) - [Commits](https://github.com/kornelski/rust-security-framework/compare/v2.10.0...v2.11.0) Updates `semver` from 1.0.22 to 1.0.23 - [Release notes](https://github.com/dtolnay/semver/releases) - [Commits](https://github.com/dtolnay/semver/compare/1.0.22...1.0.23) Updates `serde_derive` from 1.0.197 to 1.0.203 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.203) Updates `signal-hook-registry` from 1.4.1 to 1.4.2 - [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md) - [Commits](https://github.com/vorner/signal-hook/compare/registry-v1.4.1...registry-v1.4.2) Updates `sqlformat` from 0.2.3 to 0.2.4 - [Release notes](https://github.com/shssoichiro/sqlformat-rs/releases) - [Changelog](https://github.com/shssoichiro/sqlformat-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/shssoichiro/sqlformat-rs/compare/v0.2.3...v0.2.4) Updates `stringprep` from 0.1.4 to 0.1.5 - [Release notes](https://github.com/sfackler/rust-stringprep/releases) - [Commits](https://github.com/sfackler/rust-stringprep/compare/v0.1.4...v0.1.5) Updates `subtle` from 2.5.0 to 2.6.1 - [Changelog](https://github.com/dalek-cryptography/subtle/blob/main/CHANGELOG.md) - [Commits](https://github.com/dalek-cryptography/subtle/compare/2.5.0...2.6.1) Updates `thiserror-impl` from 1.0.58 to 1.0.61 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.61) Updates `tinyvec` from 1.6.0 to 1.6.1 - [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md) - [Commits](https://github.com/Lokathor/tinyvec/compare/v1.6.0...v1.6.1) Updates `tokio-macros` from 2.2.0 to 2.3.0 - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/compare/tokio-macros-2.2.0...tokio-macros-2.3.0) Updates `winapi-util` from 0.1.6 to 0.1.8 - [Commits](https://github.com/BurntSushi/winapi-util/compare/0.1.6...0.1.8) Updates `zerocopy` from 0.7.32 to 0.7.35 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/commits) Updates `zerocopy-derive` from 0.7.32 to 0.7.35 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/commits) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: tokio-util dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: url dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: derive_more dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: either dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: pretty_env_logger dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: bitflags dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: aho-corasick dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: itertools dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: quote dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: proc-macro2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: allocator-api2 dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: async-trait dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: autocfg dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: backtrace dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: bumpalo dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: cc dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: combine dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: crc dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: crossbeam-utils dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: encoding_rs dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: errno dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: fastrand dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: getrandom dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: gimli dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: httparse dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: hyper dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: include_dir dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: include_dir_macros dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: lazy_static dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: libc dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: linux-raw-sys dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: lock_api dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: memchr dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: mime_guess dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: miniz_oxide dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: native-tls dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: num-traits dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: object dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: parking_lot dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: parking_lot_core dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: paste dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: regex dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: regex-automata dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: regex-syntax dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: rustc-demangle dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: rustix dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: rustls dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: rustversion dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: ryu dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: security-framework-sys dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: semver dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: serde_derive dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: signal-hook-registry dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: sqlformat dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: stringprep dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: subtle dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: thiserror-impl dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: tinyvec dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: tokio-macros dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock - dependency-name: winapi-util dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: zerocopy dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: zerocopy-derive dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock ... Signed-off-by: dependabot[bot] --- Cargo.lock | 317 ++++++++++++++++++++++++++--------------------------- 1 file changed, 154 insertions(+), 163 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac559433..7cef8e6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -76,7 +76,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", - "itertools 0.10.5", + "itertools", "proc-macro-error", "proc-macro2", "quote", @@ -85,9 +85,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" @@ -171,9 +171,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -228,9 +228,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -246,9 +246,9 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.91" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd97381a8cc6493395a5afc4c691c1084b3768db713b73aa215217aa245d153" +checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" [[package]] name = "cfg-if" @@ -258,9 +258,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -272,9 +272,9 @@ dependencies = [ [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "futures-core", @@ -326,9 +326,9 @@ dependencies = [ [[package]] name = "crc" -version = "3.2.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2b432c56615136f8dba245fed7ec3d5518c500a31108661067e61e72fe7e6bc" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] @@ -350,9 +350,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -401,15 +401,15 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] @@ -440,18 +440,18 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -500,9 +500,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -527,15 +527,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" - -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "flume" @@ -690,9 +684,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06fddc2749e0528d2813f95e050e87e52c8cbbae56223b9babf73b3e53b0cc6" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -701,9 +695,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "h2" @@ -842,9 +836,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -869,9 +863,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", @@ -959,18 +953,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -1029,15 +1023,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -1053,17 +1038,11 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libsqlite3-sys" @@ -1078,15 +1057,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1094,9 +1073,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchit" @@ -1116,9 +1095,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -1128,9 +1107,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1144,9 +1123,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] @@ -1164,11 +1143,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -1192,9 +1170,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1211,9 +1189,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -1270,9 +1248,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1280,22 +1258,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.2", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.4", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "percent-encoding" @@ -1393,9 +1371,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -1408,9 +1386,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1485,10 +1463,19 @@ dependencies = [ ] [[package]] -name = "regex" -version = "1.10.4" +name = "redox_syscall" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags 2.4.2", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick 1.1.2", "memchr", @@ -1498,9 +1485,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick 1.1.2", "memchr", @@ -1509,9 +1496,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -1588,9 +1575,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" @@ -1603,9 +1590,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.4.2", "errno", @@ -1616,9 +1603,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.11" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", @@ -1647,15 +1634,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" @@ -1697,9 +1684,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -1707,15 +1694,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -1732,9 +1719,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", @@ -1743,9 +1730,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -1805,9 +1792,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -1858,11 +1845,10 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" dependencies = [ - "itertools 0.12.1", "nom", "unicode_categories", ] @@ -2023,13 +2009,13 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -2040,9 +2026,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2154,7 +2140,7 @@ dependencies = [ "either", "futures", "indexmap 1.9.3", - "itertools 0.10.5", + "itertools", "log", "mime", "once_cell", @@ -2210,18 +2196,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", @@ -2230,9 +2216,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" dependencies = [ "tinyvec_macros", ] @@ -2245,9 +2231,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -2263,9 +2249,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", @@ -2305,16 +2291,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -2438,6 +2423,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + [[package]] name = "unicode-segmentation" version = "1.11.0" @@ -2458,9 +2449,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -2476,9 +2467,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "uuid" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" dependencies = [ "getrandom", ] @@ -2623,7 +2614,7 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" dependencies = [ - "redox_syscall", + "redox_syscall 0.4.1", "wasite", ] @@ -2645,11 +2636,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -2826,18 +2817,18 @@ checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", From 98cc02c9ce32eb87aeddd7f4457a8b2353cf4d7c Mon Sep 17 00:00:00 2001 From: YouKnow Date: Fri, 5 Jul 2024 14:40:00 +0330 Subject: [PATCH 13/14] Fixed `ChatPermissions` bug and improved trace `Settings` updated CHANGELOG.md --- CHANGELOG.md | 1 + crates/teloxide-core/src/adaptors/trace.rs | 8 +- .../src/types/chat_permissions.rs | 97 +++++++++---------- 3 files changed, 52 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 815102c7..be577e57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - High CPU usage on network errors ([PR 1002](https://github.com/teloxide/teloxide/pull/1002), [Issue 780](https://github.com/teloxide/teloxide/issues/780)) - Fix app build errors when using items gated behind sqlite-storage with the feature sqlite-storage-rustls ([PR 1018](https://github.com/teloxide/teloxide/pull/1018)) - Fix typo in `ApiError::ToMuchMessages` variant (rename it to `TooMuchMessages`) ([PR 1046](https://github.com/teloxide/teloxide/pull/1046)) +- Fix `ChatPermission` behavior to accurately reflect Telegram's functionality ([PR 1068](https://github.com/teloxide/teloxide/pull/1068)) ### Changed diff --git a/crates/teloxide-core/src/adaptors/trace.rs b/crates/teloxide-core/src/adaptors/trace.rs index 4dca2bc5..f7a7b451 100644 --- a/crates/teloxide-core/src/adaptors/trace.rs +++ b/crates/teloxide-core/src/adaptors/trace.rs @@ -66,20 +66,20 @@ bitflags::bitflags! { /// ``` pub struct Settings: u8 { /// Trace requests (only request kind, e.g. `send_message`) - const TRACE_REQUESTS = 0b00000001; + const TRACE_REQUESTS = 1; /// Trace requests verbosely (with all parameters). /// /// Implies [`TRACE_REQUESTS`] - const TRACE_REQUESTS_VERBOSE = 0b00000011; + const TRACE_REQUESTS_VERBOSE = (1 << 1) | Self::TRACE_REQUESTS.bits; /// Trace responses (only request kind, e.g. `send_message`) - const TRACE_RESPONSES = 0b00000100; + const TRACE_RESPONSES = 1 << 2; /// Trace responses verbosely (with full response). /// /// Implies [`TRACE_RESPONSES`] - const TRACE_RESPONSES_VERBOSE = 0b00001100; + const TRACE_RESPONSES_VERBOSE = (1 << 3) | Self::TRACE_RESPONSES.bits; /// Trace everything. /// diff --git a/crates/teloxide-core/src/types/chat_permissions.rs b/crates/teloxide-core/src/types/chat_permissions.rs index 31b73e15..e1168e3b 100644 --- a/crates/teloxide-core/src/types/chat_permissions.rs +++ b/crates/teloxide-core/src/types/chat_permissions.rs @@ -30,84 +30,67 @@ bitflags::bitflags! { /// assert!(permissions_v1.contains(ChatPermissions::INVITE_USERS)); /// assert!(permissions_v1.contains(ChatPermissions::SEND_VIDEOS)); /// - /// // Implied by `SEND_VIDEOS` - /// assert!(permissions_v1.contains(ChatPermissions::SEND_MESSAGES)); - /// /// // Difference, remove permissions /// let permissions_v2 = permissions_v1 - ChatPermissions::SEND_VIDEOS; /// assert!(!permissions_v2.contains(ChatPermissions::SEND_VIDEOS)); - /// - /// // Removing `SEND_VIDEOS` also removes `SEND_MESSAGES` and vice versa - /// // because `SEND_MESSAGES` is implied by `SEND_VIDEOS` - /// assert!(!permissions_v2.contains(ChatPermissions::SEND_MESSAGES)); - /// - /// let permissions_v3 = permissions_v1 - ChatPermissions::SEND_MESSAGES; - /// assert!(!permissions_v3.contains(ChatPermissions::SEND_VIDEOS)); /// ``` #[derive(Serialize, Deserialize)] #[serde(from = "ChatPermissionsRaw", into = "ChatPermissionsRaw")] pub struct ChatPermissions: u16 { /// Set if the user is allowed to send text messages, contacts, - /// locations and venues. + /// giveaways, giveaway winners, invoices, locations and venues const SEND_MESSAGES = 1; - /// Set if the user is allowed to send polls, implies - /// `SEND_MESSAGES`. - const SEND_POLLS = (1 << 2) | Self::SEND_MESSAGES.bits; + /// Set if the user is allowed to send polls + const SEND_POLLS = 1 << 1; /// Set if the user is allowed to send animations, games, stickers and - /// use inline bots, implies `SEND_MEDIA_MESSAGES`. - const SEND_OTHER_MESSAGES = (1 << 3); + /// use inline bots. + const SEND_OTHER_MESSAGES = 1 << 2; /// Set if the user is allowed to add web page previews to - /// their messages, implies `SEND_MEDIA_MESSAGES`. - const ADD_WEB_PAGE_PREVIEWS = (1 << 4); + /// their messages. + const ADD_WEB_PAGE_PREVIEWS = 1 << 3; /// Set if the user is allowed to change the chat title, photo and /// other settings. Ignored in public supergroups. - const CHANGE_INFO = (1 << 5); + const CHANGE_INFO = 1 << 4; /// Set if the user is allowed to invite new users to the chat. - const INVITE_USERS = (1 << 6); + const INVITE_USERS = 1 << 5; /// Set if the user is allowed to pin messages. Ignored in public /// supergroups. - const PIN_MESSAGES = (1 << 7); + const PIN_MESSAGES = 1 << 6; /// Set if the user is allowed to create, rename, close, and reopen forum topics. - const MANAGE_TOPICS = (1 << 8); + const MANAGE_TOPICS = 1 << 7; - /// Set if the user is allowed to send audios. implies - /// `SEND_MESSAGES`. - const SEND_AUDIOS = (1 << 9) | Self::SEND_MESSAGES.bits; + /// Set if the user is allowed to send audios. + const SEND_AUDIOS = 1 << 8; - /// Set if the user is allowed to send documents. implies - /// `SEND_MESSAGES`. - const SEND_DOCUMENTS = (1 << 10) | Self::SEND_MESSAGES.bits; + /// Set if the user is allowed to send documents. + const SEND_DOCUMENTS = 1 << 9; - /// Set if the user is allowed to send photos. implies - /// `SEND_MESSAGES`. - const SEND_PHOTOS = (1 << 11) | Self::SEND_MESSAGES.bits; + /// Set if the user is allowed to send photos. + const SEND_PHOTOS = 1 << 10; - /// Set if the user is allowed to send videos. implies - /// `SEND_MESSAGES`. - const SEND_VIDEOS = (1 << 12) | Self::SEND_MESSAGES.bits; + /// Set if the user is allowed to send videos. + const SEND_VIDEOS = 1 << 11; - /// Set if the user is allowed to send video notes. implies - /// `SEND_MESSAGES`. - const SEND_VIDEO_NOTES = (1 << 13) | Self::SEND_MESSAGES.bits; + /// Set if the user is allowed to send video notes. + const SEND_VIDEO_NOTES = 1 << 12; /// Set if the user is allowed to send voice notes. implies /// `SEND_MESSAGES`. - const SEND_VOICE_NOTES = (1 << 14) | Self::SEND_MESSAGES.bits; + const SEND_VOICE_NOTES = 1 << 13; /// Set if the user is allowed to send audios, documents, /// photos, videos, video notes and voice notes, implies - /// `SEND_MESSAGES`, `SEND_AUDIOS`, `SEND_DOCUMENTS`, - /// `SEND_PHOTOS`, `SEND_VIDEOS`, `SEND_VIDEO_NOTES` and `SEND_VOICE_NOTES`. + /// `SEND_AUDIOS`, `SEND_DOCUMENTS`, `SEND_PHOTOS`, + /// `SEND_VIDEOS`, `SEND_VIDEO_NOTES` and `SEND_VOICE_NOTES`. /// Note: this is not a separate permission on it's own, this is just a alias for all the permissions mentioned. - const SEND_MEDIA_MESSAGES = Self::SEND_MESSAGES.bits - | Self::SEND_AUDIOS.bits + const SEND_MEDIA_MESSAGES = Self::SEND_AUDIOS.bits | Self::SEND_DOCUMENTS.bits | Self::SEND_PHOTOS.bits | Self::SEND_VIDEOS.bits @@ -278,12 +261,12 @@ impl From for ChatPermissionsRaw { fn from(this: ChatPermissions) -> Self { Self { can_send_messages: this.can_send_messages(), - can_send_audios: this.contains(ChatPermissions::SEND_AUDIOS), - can_send_documents: this.contains(ChatPermissions::SEND_DOCUMENTS), - can_send_photos: this.contains(ChatPermissions::SEND_PHOTOS), - can_send_videos: this.contains(ChatPermissions::SEND_VIDEOS), - can_send_video_notes: this.contains(ChatPermissions::SEND_VIDEO_NOTES), - can_send_voice_notes: this.contains(ChatPermissions::SEND_VOICE_NOTES), + can_send_audios: this.can_send_audios(), + can_send_documents: this.can_send_documents(), + can_send_photos: this.can_send_photos(), + can_send_videos: this.can_send_videos(), + can_send_video_notes: this.can_send_video_notes(), + can_send_voice_notes: this.can_send_voice_notes(), can_send_polls: this.can_send_polls(), can_send_other_messages: this.can_send_other_messages(), can_add_web_page_previews: this.can_add_web_page_previews(), @@ -370,7 +353,9 @@ mod tests { #[test] fn serialization() { - let permissions = ChatPermissions::SEND_AUDIOS | ChatPermissions::PIN_MESSAGES; + let permissions = ChatPermissions::SEND_MESSAGES + | ChatPermissions::SEND_AUDIOS + | ChatPermissions::PIN_MESSAGES; let expected = r#"{"can_send_messages":true,"can_send_audios":true,"can_pin_messages":true,"can_manage_topics":false}"#; let actual = serde_json::to_string(&permissions).unwrap(); assert_eq!(expected, actual); @@ -379,8 +364,20 @@ mod tests { #[test] fn deserialization() { let json = r#"{"can_send_messages":true,"can_send_photos":true,"can_pin_messages":true}"#; - let expected = ChatPermissions::SEND_PHOTOS | ChatPermissions::PIN_MESSAGES; + let expected = ChatPermissions::SEND_MESSAGES + | ChatPermissions::SEND_PHOTOS + | ChatPermissions::PIN_MESSAGES; let actual = serde_json::from_str(json).unwrap(); assert_eq!(expected, actual); } + + #[test] + fn modfiy_permission() { + let before = ChatPermissions::SEND_MESSAGES + | ChatPermissions::SEND_PHOTOS + | ChatPermissions::SEND_AUDIOS; + let after = before - ChatPermissions::SEND_MESSAGES; + let expected = ChatPermissions::SEND_PHOTOS | ChatPermissions::SEND_AUDIOS; + assert_eq!(after, expected); + } } From 8cb182d7b5d2d4d67c7ea8e782a5e04ceaa73d60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 09:08:36 +0000 Subject: [PATCH 14/14] Bump the lock group with 10 updates Bumps the lock group with 10 updates: | Package | From | To | | --- | --- | --- | | [serde](https://github.com/serde-rs/serde) | `1.0.203` | `1.0.204` | | [pretty_env_logger](https://github.com/seanmonstar/pretty-env-logger) | `0.4.0` | `0.5.0` | | [bitflags](https://github.com/bitflags/bitflags) | `1.3.2` | `2.4.2` | | [aho-corasick](https://github.com/BurntSushi/aho-corasick) | `0.7.20` | `1.1.2` | | [syn](https://github.com/dtolnay/syn) | `1.0.109` | `2.0.52` | | [async-trait](https://github.com/dtolnay/async-trait) | `0.1.80` | `0.1.81` | | [cc](https://github.com/rust-lang/cc-rs) | `1.0.104` | `1.0.105` | | [getrandom](https://github.com/rust-random/getrandom) | `0.2.14` | `0.2.15` | | [serde_derive](https://github.com/serde-rs/serde) | `1.0.203` | `1.0.204` | | [tinyvec](https://github.com/Lokathor/tinyvec) | `1.6.1` | `1.7.0` | Updates `serde` from 1.0.203 to 1.0.204 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204) Updates `pretty_env_logger` from 0.4.0 to 0.5.0 - [Commits](https://github.com/seanmonstar/pretty-env-logger/compare/v0.4.0...v0.5.0) Updates `bitflags` from 1.3.2 to 2.4.2 - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.4.2) Updates `aho-corasick` from 0.7.20 to 1.1.2 - [Commits](https://github.com/BurntSushi/aho-corasick/compare/0.7.20...1.1.2) Updates `syn` from 1.0.109 to 2.0.52 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.109...2.0.52) Updates `async-trait` from 0.1.80 to 0.1.81 - [Release notes](https://github.com/dtolnay/async-trait/releases) - [Commits](https://github.com/dtolnay/async-trait/compare/0.1.80...0.1.81) Updates `cc` from 1.0.104 to 1.0.105 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.104...cc-v1.0.105) Updates `getrandom` from 0.2.14 to 0.2.15 - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/getrandom/compare/v0.2.14...v0.2.15) Updates `serde_derive` from 1.0.203 to 1.0.204 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204) Updates `tinyvec` from 1.6.1 to 1.7.0 - [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md) - [Commits](https://github.com/Lokathor/tinyvec/compare/v1.6.1...v1.7.0) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch dependency-group: lock - dependency-name: pretty_env_logger dependency-type: direct:production update-type: version-update:semver-minor dependency-group: lock - dependency-name: bitflags dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: aho-corasick dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-major dependency-group: lock - dependency-name: async-trait dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: cc dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: getrandom dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: serde_derive dependency-type: indirect update-type: version-update:semver-patch dependency-group: lock - dependency-name: tinyvec dependency-type: indirect update-type: version-update:semver-minor dependency-group: lock ... Signed-off-by: dependabot[bot] --- Cargo.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7cef8e6e..41efcc3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -85,9 +85,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", @@ -246,9 +246,9 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" +checksum = "5208975e568d83b6b05cc0a063c8e7e9acc2b43bee6da15616a5b73e109d7437" [[package]] name = "cfg-if" @@ -684,9 +684,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -1700,9 +1700,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] @@ -1719,9 +1719,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -2216,9 +2216,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "ce6b6a2fb3a985e99cebfaefa9faa3024743da73304ca1c683a36429613d3d22" dependencies = [ "tinyvec_macros", ]