pub fn match_path(expected: String, actual: String, mismatches: &mut Vec<Mismatch>,
    matchers: &MatchingRules) {
    let path = vec![];
    let matcher_result = if matchers.matcher_is_defined("path", &path) {
      matchers::match_values("path", &path, matchers.clone(), &expected, &actual)
    } else {
      expected.matches(&actual, &MatchingRule::Equality).map_err(|err| vec![err])
    };
    match matcher_result {
        Err(messages) => {
          for message in messages {
            mismatches.push(Mismatch::PathMismatch {
              expected: expected.clone(),
              actual: actual.clone(), mismatch: message.clone()
            })
          }
        },
        Ok(_) => ()
    }
}
/// Matches the actual request path to the expected one.
Matches the actual request path to the expected one.
Matches the actual request path to the expected one .
pub fn match_path(expected: String, actual: String, mismatches: &mut Vec<Mismatch>,
    matchers: &MatchingRules) {
    let path = vec![];
    let matcher_result = if matchers.matcher_is_defined("path", &path) {
      matchers::match_values("path", &path, matchers.clone(), &expected, &actual)
    } else {
      expected.matches(&actual, &MatchingRule::Equality).map_err(|err| vec![err])
    };
    match matcher_result {
        Err(messages) => {
          for message in messages {
            mismatches.push(Mismatch::PathMismatch {
              expected: expected.clone(),
              actual: actual.clone(), mismatch: message.clone()
            })
          }
        },
        Ok(_) => ()
    }
}
pub fn match_path ( expected : String , actual : String , mismatches : & mut Vec < Mismatch > , matchers : & MatchingRules ) { let path = vec ! [ ] ; let matcher_result = if matchers . matcher_is_defined ( " " , & path ) { matchers :: match_values ( " " , & path , matchers . clone ( ) , & expected , & actual ) } else { expected . matches ( & actual , & MatchingRule :: Equality ) . map_err ( | err | vec ! [ err ] ) } ; match matcher_result { Err ( messages ) => { for message in messages { mismatches . push ( Mismatch :: PathMismatch { expected : expected . clone ( ) , actual : actual . clone ( ) , mismatch : message . clone ( ) } ) } } , Ok ( _ ) => ( ) } }
Matches the actual request path to the expected one.
Matches the actual request path to the expected one .
expected
String
actual
String
mismatches
&mut Vec<Mismatch>
matchers
&MatchingRules
expected
String
actual
String
mismatches
&mut Vec<Mismatch>
matchers
&MatchingRules