Fix changelogs and TooManyArguments

This commit is contained in:
puh 2023-02-07 12:55:20 +03:00
parent d961cf79f4
commit 560812dfcc
No known key found for this signature in database
GPG key ID: 171E3E1356CEE151
3 changed files with 8 additions and 2 deletions

View file

@ -9,7 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Allow `ChatJoinRequest` updates - Allow `ChatJoinRequest` updates
- Fix `split` parser for tuple variants with len < 2 ([issue #834](https://github.com/teloxide/teloxide/issues/834))
### Added ### Added

View file

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased ## unreleased
### Fixed
- Fix `split` parser for tuple variants with len < 2 ([issue #834](https://github.com/teloxide/teloxide/issues/834))
## 0.7.1 - 2023-01-17 ## 0.7.1 - 2023-01-17
### Fixed ### Fixed

View file

@ -138,10 +138,13 @@ fn parser_with_separator<'a>(
let res = #res; let res = #res;
if !s.is_empty() && splitted.count() {
}
match splitted.next() { match splitted.next() {
Some(d) if !s.is_empty() => ::std::result::Result::Err(teloxide::utils::command::ParseError::TooManyArguments { Some(d) if !s.is_empty() => ::std::result::Result::Err(teloxide::utils::command::ParseError::TooManyArguments {
expected: #expected, expected: #expected,
found: #expected + 1, found: #expected + 1 + splitted.count(),
message: format!("Excess argument: {}", d), message: format!("Excess argument: {}", d),
}), }),
_ => ::std::result::Result::Ok(res) _ => ::std::result::Result::Ok(res)