pub fn match_query(expected: Option<HashMap<String, Vec<String>>>,
    actual: Option<HashMap<String, Vec<String>>>, mismatches: &mut Vec<Mismatch>,
    matchers: &MatchingRules) {
    match (actual, expected) {
        (Some(aqm), Some(eqm)) => match_query_maps(eqm, aqm, mismatches, matchers),
        (Some(aqm), None) => for (key, value) in &aqm {
            mismatches.push(Mismatch::QueryMismatch { parameter: key.clone(),
                expected: "".to_string(),
                actual: format!("{:?}", value),
                mismatch: format!("Unexpected query parameter '{}' received", key) });
        },
        (None, Some(eqm)) => for (key, value) in &eqm {
            mismatches.push(Mismatch::QueryMismatch { parameter: key.clone(),
                expected: format!("{:?}", value),
                actual: "".to_string(),
                mismatch: format!("Expected query parameter '{}' but was missing", key) });
        },
        (None, None) => (),
    };
}
/// Matches the actual query parameters to the expected ones.
Matches the actual query parameters to the expected ones.
Matches the actual query parameters to the expected ones .
pub fn match_query(expected: Option<HashMap<String, Vec<String>>>,
    actual: Option<HashMap<String, Vec<String>>>, mismatches: &mut Vec<Mismatch>,
    matchers: &MatchingRules) {
    match (actual, expected) {
        (Some(aqm), Some(eqm)) => match_query_maps(eqm, aqm, mismatches, matchers),
        (Some(aqm), None) => for (key, value) in &aqm {
            mismatches.push(Mismatch::QueryMismatch { parameter: key.clone(),
                expected: "".to_string(),
                actual: format!("{:?}", value),
                mismatch: format!("Unexpected query parameter '{}' received", key) });
        },
        (None, Some(eqm)) => for (key, value) in &eqm {
            mismatches.push(Mismatch::QueryMismatch { parameter: key.clone(),
                expected: format!("{:?}", value),
                actual: "".to_string(),
                mismatch: format!("Expected query parameter '{}' but was missing", key) });
        },
        (None, None) => (),
    };
}
pub fn match_query ( expected : Option < HashMap < String , Vec < String > > > , actual : Option < HashMap < String , Vec < String > > > , mismatches : & mut Vec < Mismatch > , matchers : & MatchingRules ) { match ( actual , expected ) { ( Some ( aqm ) , Some ( eqm ) ) => match_query_maps ( eqm , aqm , mismatches , matchers ) , ( Some ( aqm ) , None ) => for ( key , value ) in & aqm { mismatches . push ( Mismatch :: QueryMismatch { parameter : key . clone ( ) , expected : " " . to_string ( ) , actual : format ! ( " " value ) , mismatch : format ! ( " " key ) } ) ; } , ( None , Some ( eqm ) ) => for ( key , value ) in & eqm { mismatches . push ( Mismatch :: QueryMismatch { parameter : key . clone ( ) , expected : format ! ( " " value ) , actual : " " . to_string ( ) , mismatch : format ! ( " " key ) } ) ; } , ( None , None ) => ( ) , } ; }
Matches the actual query parameters to the expected ones.
Matches the actual query parameters to the expected ones .
expected
Option<HashMap<String, Vec<String>>>
actual
Option<HashMap<String, Vec<String>>>
mismatches
&mut Vec<Mismatch>
matchers
&MatchingRules
expected
Option<HashMap<String, Vec<String>>>
actual
Option<HashMap<String, Vec<String>>>
mismatches
&mut Vec<Mismatch>
matchers
&MatchingRules