-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Unfortunately, given how segments are represented as closed-open intervals, the maximum value cannot be included in the segment. I have not yet determined a simple, consistent way to address this. For now, this is not a main concern for me as the current implementation fits my needs well enough.
Workarounds:
- For any of the numeric types, the maximum value should just not be considered a valid value. For example, valid Unicode is from
U+0000toU+10FFFF. Therefore, when representing Unicode usingu32, it is safe to ignore0xFFFFFFFF. - For an enumerated type (support for convenience constructors--like
closedandall--coming soon with It doesn't make sense to have enumerated types implementnum::One,num::Zero, orstd::ops::Add. #1), simply append anUnused(or similar) variant to the list of variants. Then, the default#[derive(Ord, PartialOrd)]will have that as the maximum value.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working