(no title)
fasquoika | 3 years ago
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
bobbylarrybobby|3 years ago
steveklabnik|3 years ago
Also: it's weird and really unfair imho that the GP is downvoted. While it is true that some folks have a different opinion, it's extremely subjective, and downvoting them for a slightly minority opinion doesn't seem right to me. I upvoted it, personally.