Fix doc test

This commit is contained in:
TheAwiteb 2023-09-25 15:21:18 +03:00
parent eeb0ef663f
commit 3d050eaf43
No known key found for this signature in database
GPG key ID: ABF818BD15DC2D34

View file

@ -348,8 +348,18 @@ impl<'a> CommandDescriptions<'a> {
/// use teloxide::utils::command::{CommandDescription, CommandDescriptions}; /// use teloxide::utils::command::{CommandDescription, CommandDescriptions};
/// ///
/// let descriptions = CommandDescriptions::new(&[ /// let descriptions = CommandDescriptions::new(&[
/// CommandDescription { prefix: "/", command: "start", description: "start this bot" }, /// CommandDescription {
/// CommandDescription { prefix: "/", command: "help", description: "show this message" }, /// prefix: "/",
/// command: "start",
/// description: "start this bot",
/// aliases: &[],
/// },
/// CommandDescription {
/// prefix: "/",
/// command: "help",
/// description: "show this message",
/// aliases: &[],
/// },
/// ]); /// ]);
/// ///
/// assert_eq!(descriptions.to_string(), "/start — start this bot\n/help — show this message"); /// assert_eq!(descriptions.to_string(), "/start — start this bot\n/help — show this message");