mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
Remove unnecessary derefs
This commit is contained in:
parent
817f492223
commit
517afc0cfe
1 changed files with 6 additions and 6 deletions
|
@ -1007,10 +1007,10 @@ impl Bot {
|
|||
where
|
||||
T: Into<String>,
|
||||
{
|
||||
match self.parse_mode.deref() {
|
||||
match self.parse_mode {
|
||||
None => EditMessageText::new(self.clone(), chat_or_inline_message, text),
|
||||
Some(parse_mode) => EditMessageText::new(self.clone(), chat_or_inline_message, text)
|
||||
.parse_mode(*parse_mode.deref()),
|
||||
.parse_mode(parse_mode),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1033,10 +1033,10 @@ impl Bot {
|
|||
&self,
|
||||
chat_or_inline_message: ChatOrInlineMessage,
|
||||
) -> EditMessageCaption {
|
||||
match self.parse_mode.deref() {
|
||||
match self.parse_mode {
|
||||
None => EditMessageCaption::new(self.clone(), chat_or_inline_message),
|
||||
Some(parse_mode) => EditMessageCaption::new(self.clone(), chat_or_inline_message)
|
||||
.parse_mode(*parse_mode.deref()),
|
||||
.parse_mode(parse_mode),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1530,9 +1530,9 @@ impl Bot {
|
|||
builder: Builder,
|
||||
f: fn(Builder, ParseMode) -> Builder,
|
||||
) -> Builder {
|
||||
match self.parse_mode.deref() {
|
||||
match self.parse_mode {
|
||||
None => builder,
|
||||
Some(parse_mode) => f(builder, *parse_mode.deref()),
|
||||
Some(parse_mode) => f(builder, parse_mode),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue