remove .to_string()

This commit is contained in:
p0lunin 2020-01-14 20:58:38 +02:00
parent 814a424caa
commit 7755e09122

View file

@ -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
}