pub fn find_value<T: PartialEq>(vec: &Vec<T>, val: T) -> Option<usize> {
    for i in 0..vec.len() {
        if vec[i] == val {
            return Some(i);
        }
    }

    None
}
/// returns the index of a given value in the vector
/// returns None if the vector does not contains the value
returns the index of a given value in the vector
returns None if the vector does not contains the value
returns the index of a given value in the vector returns None if the vector does not contains the value
pub fn find_value<T: PartialEq>(vec: &Vec<T>, val: T) -> Option<usize> {
    for i in 0..vec.len() {
        if vec[i] == val {
            return Some(i);
        }
    }
    None
}
pub fn find_value < T : PartialEq > ( vec : & Vec < T > , val : T ) -> Option < usize > { for i in 0 .. vec . len ( ) { if vec [ i ] == val { return Some ( i ) ; } } None }
returns the index of a given value in the vector
returns None if the vector does not contains the value
returns the index of a given value in the vector returns None if the vector does not contains the value
vec
&Vec<T>
val
T
vec
&Vec<T>
val
T