Point to the migration guide from README.md

This commit is contained in:
Hirrolot 2021-07-08 15:24:55 +06:00
parent 674b1f974a
commit f85c771590

View file

@ -1,18 +1,4 @@
<details>
<summary>FYI: Updating from v0.3.4 to v0.4.0</summary>
- `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>`.
- `ResponseResult<()>` -> `Result<(), Box<dyn Error + Send + Sync>>` (or import `ResponseResult` beforehand: `use teloxide::requests::ResponseResult;`)
- Tokio updated to v1.2.
Note: this list is non-exhaustive; for the full list of changes, see the [teloxide-core changelog] and [teloxide changelog].
[teloxide-core changelog]: https://github.com/teloxide/teloxide-core/blob/master/CHANGELOG.md
[teloxide changelog]: CHANGELOG.md
</details>
[v0.4.0 => v0.5.0 migration guide >>](MIGRATION_GUIDE.md)
<div align="center">
<img src="ICON.png" width="250"/>