From 086789e5ca7e0b8f7e4d972414e34d3902c6ac4d Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Wed, 13 Jan 2021 11:31:08 +0600 Subject: [PATCH 1/2] serde::export -> std::fmt --- CHANGELOG.md | 6 ++++++ src/types/non_telegram_types/mime_wrapper.rs | 6 ++++-- src/utils/command.rs | 6 ++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e03b4ea9..735cbe1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [issue 253]: https://github.com/teloxide/teloxide/issues/253 [pr 257]: https://github.com/teloxide/teloxide/pull/257 +## [0.3.4] - 2020-01-13 + +### Fixed + + - Failing compilation with `serde::export` ([issue 328](https://github.com/teloxide/teloxide/issues/328)). + ## [0.3.3] - 2020-10-30 ### Fixed diff --git a/src/types/non_telegram_types/mime_wrapper.rs b/src/types/non_telegram_types/mime_wrapper.rs index 43326de6..848b3376 100644 --- a/src/types/non_telegram_types/mime_wrapper.rs +++ b/src/types/non_telegram_types/mime_wrapper.rs @@ -1,6 +1,8 @@ +use std::fmt::Formatter; + use derive_more::From; use mime::Mime; -use serde::{de::Visitor, export::Formatter, Deserialize, Deserializer, Serialize, Serializer}; +use serde::{de::Visitor, Deserialize, Deserializer, Serialize, Serializer}; /// Serializable & deserializable `MIME` wrapper. #[derive(Clone, Debug, Eq, Hash, PartialEq, From)] @@ -19,7 +21,7 @@ struct MimeVisitor; impl<'a> Visitor<'a> for MimeVisitor { type Value = MimeWrapper; - fn expecting(&self, formatter: &mut Formatter<'_>) -> Result<(), serde::export::fmt::Error> { + fn expecting(&self, formatter: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { formatter.write_str("mime type") } diff --git a/src/utils/command.rs b/src/utils/command.rs index ff5c9023..8c849ddf 100644 --- a/src/utils/command.rs +++ b/src/utils/command.rs @@ -44,8 +44,10 @@ //! //! [examples/admin_bot]: https://github.com/teloxide/teloxide/blob/master/examples/admin_bot/ -use serde::export::Formatter; -use std::{error::Error, fmt::Display}; +use std::{ + error::Error, + fmt::{Display, Formatter}, +}; pub use teloxide_macros::BotCommand; /// An enumeration of bot's commands. From 433b4df6145b184d206ab42743c04303f0c270f8 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Wed, 13 Jan 2021 11:32:39 +0600 Subject: [PATCH 2/2] v0.3.4 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7168293a..0146206b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "teloxide" -version = "0.3.2" +version = "0.3.4" edition = "2018" description = "An elegant Telegram bots framework for Rust" repository = "https://github.com/teloxide/teloxide"