fn find_range(list: &Vec<Version>) -> (bool, Version, usize) {
    if list.len() == 0 {
        return (false, 0, 0);
    }

    let mut index: usize = 0;
    let mut iterable = list.iter().peekable();
    let mut range_end = match iterable.next() {
        Some(n) => *n,
        None => return (false, 0, 0),
    };

    let mut has_range = false;

    while iterable.peek().is_some() {
        let n = *iterable.next().unwrap();
        if n != range_end + 1 {
            break;
        }

        has_range = true;
        range_end = n;
        index += 1;
    }

    (has_range, range_end, index)
}
/// Checks to see if there is a continuous range of integers, starting at the
/// first in the list. Returns the last integer in the range if a range exists.
///
/// # Inputs
///
/// `list`, an ordered  vector of `u32` integers of "[0-9,-]" representing the
/// supported versions for a single protocol.
///
/// # Returns
///
/// A `bool` indicating whether the list contains a range, starting at the first
/// in the list, a`Version` of the last integer in the range, and a `usize` of
/// the index of that version.
///
/// For example, if given vec![1, 2, 3, 5], find_range will return true,
/// as there is a continuous range, and 3, which is the last number in the
/// continuous range, and 2 which is the index of 3.
Checks to see if there is a continuous range of integers, starting at the
first in the list. Returns the last integer in the range if a range exists.
Checks to see if there is a continuous range of integers starting at the first in the list . Returns the last integer in the range if a range exists .
fn find_range(list: &Vec<Version>) -> (bool, Version, usize) {
    if list.len() == 0 {
        return (false, 0, 0);
    }
    let mut index: usize = 0;
    let mut iterable = list.iter().peekable();
    let mut range_end = match iterable.next() {
        Some(n) => *n,
        None => return (false, 0, 0),
    };
    let mut has_range = false;
    while iterable.peek().is_some() {
        let n = *iterable.next().unwrap();
        if n != range_end + 1 {
            break;
        }
        has_range = true;
        range_end = n;
        index += 1;
    }
    (has_range, range_end, index)
}
fn find_range ( list : & Vec < Version > ) -> ( bool , Version , usize ) { if list . len ( ) == 0 { return ( false , 0 , 0 ) ; } let mut index : usize = 0 ; let mut iterable = list . iter ( ) . peekable ( ) ; let mut range_end = match iterable . next ( ) { Some ( n ) => * n , None => return ( false , 0 , 0 ) , } ; let mut has_range = false ; while iterable . peek ( ) . is_some ( ) { let n = * iterable . next ( ) . unwrap ( ) ; if n != range_end + 1 { break ; } has_range = true ; range_end = n ; index += 1 ; } ( has_range , range_end , index ) }
Checks to see if there is a continuous range of integers, starting at the
first in the list.
Checks to see if there is a continuous range of integers starting at the first in the list .
list
&Vec<Version>
A `bool` indicating whether the list contains a range, starting at the first
in the list, a`Version` of the last integer in the range, and a `usize` of
the index of that version.

For example, if given vec![1, 2, 3, 5], find_range will return true,
as there is a continuous range, and 3, which is the last number in the
continuous range, and 2 which is the index of 3.
A ` bool ` indicating whether the list contains a range starting at the first in the list a ` Version ` of the last integer in the range and a ` usize ` of the index of that version . For example if given vec! [ 1 2 3 5 ] find_range will return true as there is a continuous range and 3 which is the last number in the continuous range and 2 which is the index of 3 .
list
&Vec<Version>
inputs
`list`, an ordered  vector of `u32` integers of "[0-9,-]" representing the
supported versions for a single protocol.
` list ` an ordered vector of ` u32 ` integers of " [ 0 - 9 - ] " representing the supported versions for a single protocol .