Merge pull request #636 from teloxide/fix-docs

Fix docs
This commit is contained in:
Hirrolot 2022-05-26 23:59:50 +06:00 committed by GitHub
commit 20d461f771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 12 deletions

View file

@ -18,7 +18,7 @@ jobs:
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly-2022-02-02 toolchain: nightly-2022-05-06
override: true override: true
components: rustfmt components: rustfmt
@ -37,7 +37,7 @@ jobs:
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: nightly-2022-02-02 toolchain: nightly-2022-05-06
override: true override: true
components: clippy components: clippy
@ -65,7 +65,7 @@ jobs:
toolchain: beta toolchain: beta
features: "--features full" features: "--features full"
- rust: nightly - rust: nightly
toolchain: nightly-2022-01-17 toolchain: nightly-2022-05-06
features: "--all-features" features: "--all-features"
- rust: msrv - rust: msrv
toolchain: "1.58.0" toolchain: "1.58.0"

View file

@ -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. - **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 [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]. - **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].

View file

@ -1,4 +1,4 @@
[toolchain] [toolchain]
channel = "nightly-2022-02-02" channel = "nightly-2022-05-06"
components = ["rustfmt", "clippy"] components = ["rustfmt", "clippy"]
profile = "minimal" profile = "minimal"

View file

@ -1,10 +1,10 @@
//! A full-featured framework that empowers you to easily build [Telegram bots] //! A full-featured framework that empowers you to easily build [Telegram bots]
//! using the [`async`/`.await`] syntax in [Rust]. It handles all the difficult //! using [Rust]. It handles all the difficult stuff so you can focus only on
//! stuff so you can focus only on your business logic. //! your business logic.
//! //!
//! For a high-level overview, see [our GitHub repository](https://github.com/teloxide/teloxide). //! 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 //! ```no_run
//! use teloxide::prelude::*; //! use teloxide::prelude::*;
//! //!
@ -25,7 +25,7 @@
//! //!
//! <div align="center"> //! <div align="center">
//! <kbd> //! <kbd>
//! <img src=https://github.com/teloxide/teloxide/raw/master/media/DICES_BOT.gif /> //! <img src=https://github.com/teloxide/teloxide/raw/master/media/throw-dice.gif width=420px />
//! </kbd> //! </kbd>
//! </div> //! </div>
//! //!

View file

@ -160,8 +160,10 @@ pub use teloxide_macros::BotCommands;
/// All variant attributes override the corresponding `enum` attributes. /// All variant attributes override the corresponding `enum` attributes.
/// ///
/// 1. `#[command(rename = "rule")]` /// 1. `#[command(rename = "rule")]`
/// Rename one command by a rule. Allowed rules are `lowercase`, `%some_name%`, /// Rename one command by a rule. Allowed rules are `lowercase`, `UPPERCASE`,
/// where `%some_name%` is any string, a new name. /// `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")]` /// 2. `#[command(description = "description")]`
/// Give your command a description. Write `"off"` for `"description"` to hide a /// Give your command a description. Write `"off"` for `"description"` to hide a
@ -323,7 +325,7 @@ impl<'a> CommandDescriptions<'a> {
/// assert_eq!( /// assert_eq!(
/// descriptions.username("username_of_the_bot").to_string(), /// descriptions.username("username_of_the_bot").to_string(),
/// "/start@username_of_the_bot — start this bot\n/help@username_of_the_bot — show this \ /// "/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 { pub fn username(self, bot_username: &'a str) -> Self {