pub fn range_value_add<V: Eq>(
    ranges: &mut Vec<(u32, u32, V)>,
    codepoint: u32,
    value: V,
) {
    if let Some(&mut (_, ref mut end, ref value2)) = ranges.last_mut() {
        assert!(*end < codepoint);
        if codepoint == *end + 1 && &value == value2 {
            *end = codepoint;
            return;
        }
    }
    ranges.push((codepoint, codepoint, value));
}
/// Push a codepoint associated with a value onto a vec of ranges. If the
/// codepoint belongs to the most recently added range and its value
/// corresponds to the range's value, then increase the range to include this
/// codepoint. Otherwise, add a new range containingly only the codepoint and
/// value given.
///
/// This panics if the given codepoint is already in the ranges or if a
/// codepoint is given out of order.
Push a codepoint associated with a value onto a vec of ranges. If the
codepoint belongs to the most recently added range and its value
corresponds to the range's value, then increase the range to include this
codepoint. Otherwise, add a new range containingly only the codepoint and
value given.

This panics if the given codepoint is already in the ranges or if a
codepoint is given out of order.
Push a codepoint associated with a value onto a vec of ranges . If the codepoint belongs to the most recently added range and its value corresponds to the range ' s value then increase the range to include this codepoint . Otherwise add a new range containingly only the codepoint and value given . This panics if the given codepoint is already in the ranges or if a codepoint is given out of order .
pub fn range_value_add<V: Eq>(
    ranges: &mut Vec<(u32, u32, V)>,
    codepoint: u32,
    value: V,
) {
    if let Some(&mut (_, ref mut end, ref value2)) = ranges.last_mut() {
        assert!(*end < codepoint);
        if codepoint == *end + 1 && &value == value2 {
            *end = codepoint;
            return;
        }
    }
    ranges.push((codepoint, codepoint, value));
}
pub fn range_value_add < V : Eq > ( ranges : & mut Vec < ( u32 , u32 , V ) > , codepoint : u32 , value : V , ) { if let Some ( & mut ( _ , ref mut end , ref value2 ) ) = ranges . last_mut ( ) { assert ! ( end codepoint ) ; if codepoint == * end + 1 && & value == value2 { * end = codepoint ; return ; } } ranges . push ( ( codepoint , codepoint , value ) ) ; }
Push a codepoint associated with a value onto a vec of ranges.
Push a codepoint associated with a value onto a vec of ranges .
ranges
&mut Vec<(u32, u32, V)>
codepoint
u32
value
V
ranges
&mut Vec<(u32, u32, V)>
codepoint
u32
value
V