Add #[serde(untagged)] to ChatId

This commit is contained in:
Waffle 2019-09-05 18:44:08 +03:00
parent 17a26aec7b
commit e58d40a765

View file

@ -54,6 +54,7 @@ pub struct RequestContext<'a> {
/// Unique identifier for the target chat or username of the target channel (in
/// the format @channelusername)
#[derive(Debug, Display, Serialize, From, PartialEq, Eq, Clone)]
#[serde(untagged)]
pub enum ChatId {
/// chat identifier
#[display(fmt = "{}", _0)]