Merge pull request #38 from teloxide/v0.7.0

Release v0.7.0
This commit is contained in:
Hirrolot 2022-10-06 23:48:37 +06:00 committed by GitHub
commit 10cf4fc0e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 9 deletions

View file

@ -6,14 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased ## unreleased
## 0.7.0 - 2022-10-06
### Removed ### Removed
- Remove `derive(DialogueState)` macro - `derive(DialogueState)` macro
### Changed ### 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(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(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 ## 0.6.3 - 2022-07-19

View file

@ -1,9 +1,9 @@
[package] [package]
name = "teloxide-macros" name = "teloxide-macros"
version = "0.6.3" version = "0.7.0"
description = "The teloxide's procedural macros" description = "The teloxide's procedural macros"
license = "MIT" license = "MIT"
edition = "2018" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -3,7 +3,6 @@ use crate::{
fields_parse::ParserType, rename_rules::RenameRule, Result, fields_parse::ParserType, rename_rules::RenameRule, Result,
}; };
#[derive(Debug)]
pub(crate) struct CommandEnum { pub(crate) struct CommandEnum {
pub prefix: String, pub prefix: String,
pub description: Option<String>, pub description: Option<String>,

View file

@ -17,8 +17,6 @@ pub(crate) fn compile_error_at(msg: &str, sp: Span) -> Error {
use proc_macro2::{ use proc_macro2::{
Delimiter, Group, Ident, Literal, Punct, Spacing, TokenTree, Delimiter, Group, Ident, Literal, Punct, Spacing, TokenTree,
}; };
use std::iter::FromIterator;
// compile_error! { $msg } // compile_error! { $msg }
let ts = TokenStream::from_iter(vec![ let ts = TokenStream::from_iter(vec![
TokenTree::Ident(Ident::new("compile_error", sp)), TokenTree::Ident(Ident::new("compile_error", sp)),

View file

@ -3,7 +3,7 @@ use syn::{Fields, FieldsNamed, FieldsUnnamed, Type};
use crate::{attr::AttrValue, error::Result}; use crate::{attr::AttrValue, error::Result};
#[derive(Debug, Clone)] #[derive(Clone)]
pub(crate) enum ParserType { pub(crate) enum ParserType {
Default, Default,
Split { separator: Option<String> }, Split { separator: Option<String> },