Comment Comment by fasquoika >A safe alternative is to use indexes instead of references. struct ParsedFile { contents: Vec<u8>, words: Vec<(usize, usize)> } >This works well, and you can make it ergonomic by wrapping the index pair in a new typeYou should probably just use the std::ops::Range type for this. It's what's created by the `..` syntax parent fasquoika 4 years ago
You should probably just use the std::ops::Range type for this. It's what's created by the `..` syntax