mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-18 15:20:15 +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) => {
|
Some(text) => {
|
||||||
let left = self.offset;
|
let left = self.offset;
|
||||||
let right = self.offset+self.length;
|
let right = self.offset+self.length;
|
||||||
Some(String::from(text)[left..right].to_string())
|
Some(String::from(&text[left..right]))
|
||||||
}
|
}
|
||||||
None => None
|
None => None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue