mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
Update README.md
This commit is contained in:
parent
13e4bdb4e7
commit
31eda80da0
1 changed files with 6 additions and 1 deletions
|
@ -2,10 +2,15 @@
|
||||||
<summary>FYI: Updating from v0.3.4 to v0.4.0</summary>
|
<summary>FYI: Updating from v0.3.4 to v0.4.0</summary>
|
||||||
|
|
||||||
- `answer_str` -> `answer`
|
- `answer_str` -> `answer`
|
||||||
|
- `msg.text_owned()` -> `msg.map(ToOwned::to_owned)`
|
||||||
- Use `.auto_send()` to construct your bot: `let bot = Bot::from_env().auto_send();`. This allows not to write `.send()` after each request; now it is done automatically. Also, rewrite `UpdateWithCx<Message>` -> `UpdateWithCx<AutoSend<Bot>, Message>`.
|
- Use `.auto_send()` to construct your bot: `let bot = Bot::from_env().auto_send();`. This allows not to write `.send()` after each request; now it is done automatically. Also, rewrite `UpdateWithCx<Message>` -> `UpdateWithCx<AutoSend<Bot>, Message>`.
|
||||||
- `ResponseResult<()>` -> `Result<(), Box<dyn Error + Send + Sync>>` (or import `ResponseResult` beforehand: `use teloxide::requests::ResponseResult;`)
|
- `ResponseResult<()>` -> `Result<(), Box<dyn Error + Send + Sync>>` (or import `ResponseResult` beforehand: `use teloxide::requests::ResponseResult;`)
|
||||||
- Tokio updated to v1.2.
|
- Tokio updated to v1.2.
|
||||||
- `msg.text_owned()` -> `msg.map(ToOwned::to_owned)`
|
|
||||||
|
Note: this list is non-exhaustive; for the full list of changes, see [teloxide-core's changelog] and the [changelog of teloxide].
|
||||||
|
|
||||||
|
[teloxide-core's changelog]: https://github.com/teloxide/teloxide-core/blob/master/CHANGELOG.md
|
||||||
|
[changelog of teloxide]: CHANGELOG.md
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue