Background
What is your motivation?
Rust 1.96.0 introduced new Range types, and I'd like to use SampleRange for them.
What type of application is this? (E.g. cryptography, game, numerical simulation)
Nothing specific, more related to API surface.
Feature request
Extend the impl_sample_range_u so that they also implement SampleRange for for core::range::RangeToInclusive, core::range::RangeToInclusiveIter, core::range::RangeFromcore::range::RangeFromIter, core::range::Range, core::range::RangeIter
One concern is that we'd have to do something to only include this code when the Rust compiler is new enough.
We can use a feature to manually enable the impl, which would be the easiest. It wouldn't break consumers on <1.96.0, and for consumers >=1.96.0 they'd have to enable it manually. Or if we'd like to have it automatically we can use https://crates.io/crates/version_check or https://crates.io/crates/rustversion to guard it against Rust's version.
Thankfully range already has edition = 2024, so that's not blocking us.
Background
What is your motivation?
Rust 1.96.0 introduced new Range types, and I'd like to use
SampleRangefor them.What type of application is this? (E.g. cryptography, game, numerical simulation)
Nothing specific, more related to API surface.
Feature request
Extend the
impl_sample_range_uso that they also implementSampleRangefor for core::range::RangeToInclusive, core::range::RangeToInclusiveIter, core::range::RangeFromcore::range::RangeFromIter, core::range::Range, core::range::RangeIterOne concern is that we'd have to do something to only include this code when the Rust compiler is new enough.
We can use a feature to manually enable the
impl, which would be the easiest. It wouldn't break consumers on <1.96.0, and for consumers >=1.96.0 they'd have to enable it manually. Or if we'd like to have it automatically we can use https://crates.io/crates/version_check or https://crates.io/crates/rustversion to guard it against Rust's version.Thankfully
rangealready hasedition = 2024, so that's not blocking us.