mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Merge pull request #729 from teloxide/update-macros
Update `teloxide-macros` to v0.7.0
This commit is contained in:
commit
cb7123b222
3 changed files with 5 additions and 5 deletions
|
@ -58,7 +58,7 @@ full = [
|
|||
|
||||
[dependencies]
|
||||
# teloxide-core = { version = "0.7.0", default-features = false }
|
||||
# teloxide-macros = { version = "0.6.3", optional = true }
|
||||
teloxide-macros = { version = "0.7.0", optional = true }
|
||||
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
@ -67,7 +67,7 @@ dptree = "0.3.0"
|
|||
|
||||
# These lines are used only for development.
|
||||
teloxide-core = { git = "https://github.com/teloxide/teloxide-core", rev = "00165e6", default-features = false }
|
||||
teloxide-macros = { git = "https://github.com/teloxide/teloxide-macros", rev = "a2a79e29cb106a5d3052cf32a23e698db859cc2a", optional = true }
|
||||
# teloxide-macros = { git = "https://github.com/teloxide/teloxide-macros", rev = "e715105", optional = true }
|
||||
# dptree = { git = "https://github.com/teloxide/dptree", rev = "df578e4" }
|
||||
|
||||
tokio = { version = "1.8", features = ["fs"] }
|
||||
|
|
|
@ -194,7 +194,7 @@ pub use teloxide_macros::BotCommands;
|
|||
/// #[derive(BotCommands, PartialEq, Debug)]
|
||||
/// #[command(rename_rule = "lowercase")]
|
||||
/// enum Command {
|
||||
/// #[command(parse_with = "accept_two_digits")]
|
||||
/// #[command(parse_with = accept_two_digits)]
|
||||
/// Num(u8),
|
||||
/// }
|
||||
///
|
||||
|
|
|
@ -161,11 +161,11 @@ fn parse_custom_parser() {
|
|||
#[derive(BotCommands, Debug, PartialEq)]
|
||||
#[command(rename_rule = "lowercase")]
|
||||
enum DefaultCommands {
|
||||
#[command(parse_with = "custom_parse_function")]
|
||||
#[command(parse_with = custom_parse_function)]
|
||||
Start(u8, String),
|
||||
|
||||
// Test <https://github.com/teloxide/teloxide/issues/668>.
|
||||
#[command(parse_with = "parser::custom_parse_function")]
|
||||
#[command(parse_with = parser::custom_parse_function)]
|
||||
TestPath(u8, String),
|
||||
|
||||
Help,
|
||||
|
|
Loading…
Reference in a new issue