I have a struct MyStruct<'a>
where self.text
is of type &'a str
I assumed that this would give me a substring of this str:
let slice: &str = self.text[i .. self.text.len()];
However I get the following error:
src/lexer.rs:67:28: 67:59 error: mismatched types: expected `&str`, found `str` (expected &-ptr, found str) [E0308] src/lexer.rs:67 let slice: &str = self.text[i .. self.text.len()];
What am I doing wrong?