pub fn comp_opt<T: Eq>(left: &Option<T>, right: &Option<T>) -> bool {
  match (left, right) {
    (&Some(ref i), &Some(ref j)) if i == j => true,
    (&None, &None) => true,
    _ => false
  }
}
/// Compares two Options that contain comparable structs
Compares two Options that contain comparable structs
Compares two Options that contain comparable structs
pub fn comp_opt<T: Eq>(left: &Option<T>, right: &Option<T>) -> bool {
  match (left, right) {
    (&Some(ref i), &Some(ref j)) if i == j => true,
    (&None, &None) => true,
    _ => false
  }
}
pub fn comp_opt < T : Eq > ( left : & Option < T > , right : & Option < T > ) -> bool { match ( left , right ) { ( & Some ( ref i ) , & Some ( ref j ) ) if i == j => true , ( & None , & None ) => true , _ => false } }
Compares two Options that contain comparable structs
Compares two Options that contain comparable structs
left
&Option<T>
right
&Option<T>
left
&Option<T>
right
&Option<T>