mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-31 16:40:37 +01:00
remove .to_string()
This commit is contained in:
parent
814a424caa
commit
7755e09122
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ impl MessageEntity {
|
|||
Some(text) => {
|
||||
let left = self.offset;
|
||||
let right = self.offset+self.length;
|
||||
Some(String::from(text)[left..right].to_string())
|
||||
Some(String::from(&text[left..right]))
|
||||
}
|
||||
None => None
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue