mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Fix changelogs and TooManyArguments
This commit is contained in:
parent
d961cf79f4
commit
560812dfcc
3 changed files with 8 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue