diff --git a/CHANGELOG.md b/CHANGELOG.md index a3bc8fec..34b61e81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,14 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## unreleased +## 0.7.0 - 2022-10-06 + ### Removed -- Remove `derive(DialogueState)` macro +- `derive(DialogueState)` macro ### Changed -- `#[command(rename = "...")]` now always renames to `"..."`, to rename multiple commands using the same pattern, use `#[command(rename_rule = "snake_case")]` and the like. -- `#[command(parse_with = ...)]` now requires a path, instead of a string, when specifying custom parsers +- `#[command(rename = "...")]` now always renames to `"..."`; to rename multiple commands using the same pattern, use `#[command(rename_rule = "snake_case")]` and the like. +- `#[command(parse_with = ...)]` now requires a path, instead of a string, when specifying custom parsers. + +### Fixed + +- `#[derive(BotCommands)]` even if the trait is not imported ([issue #717](https://github.com/teloxide/teloxide/issues/717)). ## 0.6.3 - 2022-07-19 diff --git a/Cargo.toml b/Cargo.toml index 5900ee5f..e2cb3d1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "teloxide-macros" -version = "0.6.3" +version = "0.7.0" description = "The teloxide's procedural macros" license = "MIT" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/command_enum.rs b/src/command_enum.rs index 2a882e17..55f37610 100644 --- a/src/command_enum.rs +++ b/src/command_enum.rs @@ -3,7 +3,6 @@ use crate::{ fields_parse::ParserType, rename_rules::RenameRule, Result, }; -#[derive(Debug)] pub(crate) struct CommandEnum { pub prefix: String, pub description: Option, diff --git a/src/error.rs b/src/error.rs index 3f1603bf..0d27c475 100644 --- a/src/error.rs +++ b/src/error.rs @@ -17,8 +17,6 @@ pub(crate) fn compile_error_at(msg: &str, sp: Span) -> Error { use proc_macro2::{ Delimiter, Group, Ident, Literal, Punct, Spacing, TokenTree, }; - use std::iter::FromIterator; - // compile_error! { $msg } let ts = TokenStream::from_iter(vec![ TokenTree::Ident(Ident::new("compile_error", sp)), diff --git a/src/fields_parse.rs b/src/fields_parse.rs index 599aa0c4..caf53127 100644 --- a/src/fields_parse.rs +++ b/src/fields_parse.rs @@ -3,7 +3,7 @@ use syn::{Fields, FieldsNamed, FieldsUnnamed, Type}; use crate::{attr::AttrValue, error::Result}; -#[derive(Debug, Clone)] +#[derive(Clone)] pub(crate) enum ParserType { Default, Split { separator: Option },