From ee819548c08b5c4c8d202a05ddce02781ea17694 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Thu, 26 May 2022 23:20:32 +0600 Subject: [PATCH 1/4] Update the documentation of `BotCommands` --- src/utils/command.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/utils/command.rs b/src/utils/command.rs index e6491697..8d29ee7b 100644 --- a/src/utils/command.rs +++ b/src/utils/command.rs @@ -160,8 +160,10 @@ pub use teloxide_macros::BotCommands; /// All variant attributes override the corresponding `enum` attributes. /// /// 1. `#[command(rename = "rule")]` -/// Rename one command by a rule. Allowed rules are `lowercase`, `%some_name%`, -/// where `%some_name%` is any string, a new name. +/// Rename one command by a rule. Allowed rules are `lowercase`, `UPPERCASE`, +/// `PascalCase`, `camelCase`, `snake_case`, `SCREAMING_SNAKE_CASE`, +/// `kebab-case`, `SCREAMING-KEBAB-CASE`, and `%some_name%`, where `%some_name%` +/// is any string, a new name. /// /// 2. `#[command(description = "description")]` /// Give your command a description. Write `"off"` for `"description"` to hide a @@ -323,7 +325,7 @@ impl<'a> CommandDescriptions<'a> { /// assert_eq!( /// descriptions.username("username_of_the_bot").to_string(), /// "/start@username_of_the_bot — start this bot\n/help@username_of_the_bot — show this \ - /// message" + /// message" /// ); /// ``` pub fn username(self, bot_username: &'a str) -> Self { From 5b2b7c23f7bf65fa9ac3c84a8262405a3ce1171f Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Thu, 26 May 2022 23:26:53 +0600 Subject: [PATCH 2/4] Update other doc places --- README.md | 2 +- src/lib.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 32b7d8fa..0e758242 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ - **Declarative design.** teloxide is based upon [`dptree`], a functional [chain of responsibility] pattern that allows you to express pipelines of message processing in a highly declarative and extensible style. -[`dptree`]: https://github.com/p0lunin/dptree +[`dptree`]: https://github.com/teloxide/dptree [chain of responsibility]: https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern - **Dialogues management subsystem.** Our dialogues management subsystem is simple and easy-to-use, and, furthermore, is agnostic of how/where dialogues are stored. For example, you can just replace a one line to achieve [persistence]. Out-of-the-box storages include [Redis] and [Sqlite]. diff --git a/src/lib.rs b/src/lib.rs index f25e81a9..f53ed5c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,10 @@ //! A full-featured framework that empowers you to easily build [Telegram bots] -//! using the [`async`/`.await`] syntax in [Rust]. It handles all the difficult -//! stuff so you can focus only on your business logic. +//! using [Rust]. It handles all the difficult stuff so you can focus only on +//! your business logic. //! //! For a high-level overview, see [our GitHub repository](https://github.com/teloxide/teloxide). //! -//! ([Full](https://github.com/teloxide/teloxide/blob/master/examples/throw_dice.rs)) +//! [[`examples/throw_dice.rs`](https://github.com/teloxide/teloxide/blob/master/examples/throw_dice.rs)] //! ```no_run //! use teloxide::prelude::*; //! @@ -25,7 +25,7 @@ //! //!
//! -//! +//! //! //!
//! From 898ef3ab6217a53ed9b4b44fcf02f5623dc82cd9 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Thu, 26 May 2022 23:38:19 +0600 Subject: [PATCH 3/4] Update the `nightly` toolchain (CI) --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b60d7eb..e990ad6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly-2022-02-02 + toolchain: nightly-2022-05-06 override: true components: rustfmt @@ -37,7 +37,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly-2022-02-02 + toolchain: nightly-2022-05-06 override: true components: clippy @@ -65,7 +65,7 @@ jobs: toolchain: beta features: "--features full" - rust: nightly - toolchain: nightly-2022-01-17 + toolchain: nightly-2022-05-06 features: "--all-features" - rust: msrv toolchain: "1.58.0" From 2a0f8260bd86424acc380122ea285c730ec6713a Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Thu, 26 May 2022 23:40:40 +0600 Subject: [PATCH 4/4] Update `rust-toolchain.toml` --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7158d75f..43d17c19 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2022-02-02" +channel = "nightly-2022-05-06" components = ["rustfmt", "clippy"] profile = "minimal"