mirror of
https://github.com/teloxide/teloxide.git
synced 2024-10-24 09:57:18 +02:00
Un Arc<_> Bot::parse_mode
This commit is contained in:
parent
d7ad1f26ed
commit
817f492223
1 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ pub(crate) const TELOXIDE_PROXY: &str = "TELOXIDE_PROXY";
|
|||
pub struct Bot {
|
||||
token: Arc<str>,
|
||||
client: Client,
|
||||
parse_mode: Arc<Option<ParseMode>>,
|
||||
parse_mode: Option<ParseMode>,
|
||||
}
|
||||
|
||||
impl Bot {
|
||||
|
@ -95,7 +95,7 @@ impl Bot {
|
|||
Self {
|
||||
token: Into::<Arc<str>>::into(Into::<String>::into(token)),
|
||||
client,
|
||||
parse_mode: Arc::new(None),
|
||||
parse_mode: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ impl BotBuilder {
|
|||
Bot {
|
||||
client: self.client.unwrap_or_else(crate::utils::client_from_env),
|
||||
token: self.token.unwrap_or_else(|| get_env(TELOXIDE_TOKEN)).into(),
|
||||
parse_mode: Arc::new(self.parse_mode),
|
||||
parse_mode: self.parse_mode,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue