Is it possible to get the start and end values of a RangeInclusive without iterating through it?
For context, I want to loop through a string and store the spans where a specific set of values appears. When displaying them later on, I intend to clone the string and highlight each value with a certain background colour. I have the following struct (not fully accurate, but it's enough):
pub struct HighlightSet<'source> {
source: &'source str,
highlights: Vec<RangeInclusive<usize>>,
}
If possible, I would like to avoid storing the start and end values in a custom-made struct or a tuple, as I feel like a range type makes what is being stored here clearer when looking at the code.

