|
|
|
|
|
by fasquoika
1515 days ago
|
|
>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 |
|