Remove unnecessary println!

This commit is contained in:
Fabrice Reix 2020-09-19 18:32:29 +02:00
parent 59aa9dede3
commit c69587fa8d
4 changed files with 2 additions and 9 deletions

View File

@ -229,7 +229,7 @@ mod tests {
String::from("[Asserts]\n"),
String::from("jsonpath \"$.message\" startsWith \"hello\"")
];
let error = Error {
let _error = Error {
source_info: SourceInfo::init(3, 0, 3, 0),
description: String::from("Assert Error"),
fixme: String::from("actual: string <tutu>\nexpected: starts with string <toto>"),
@ -239,8 +239,6 @@ mod tests {
color: false,
};
eprintln!("{}", error.format());
//assert_eq!(1,2);
}
}

View File

@ -66,7 +66,6 @@ impl Selector {
elements.push(elem.clone());
}
for value in obj.values() {
eprintln!(">> value = {:?}", value);
for element in Selector::RecursiveKey(key.clone()).eval(value.clone()) {
elements.push(element);
};
@ -89,7 +88,6 @@ impl Selector {
impl Predicate {
pub fn eval(&self, elem: serde_json::Value) -> bool {
//eprintln!("eval elem {:?}", elem);
match elem {
serde_json::Value::Object(ref obj) => match (obj.get(self.key.as_str()), self.func.clone()) {
(Some(serde_json::Value::Number(v)), PredicateFunc::Equal(ref num))

View File

@ -190,7 +190,6 @@ fn template_element_string(char_parser: CharParser, reader: &mut Reader) -> Pars
loop {
match char_parser(reader) {
Err(e) => {
//eprintln!(">>error {:?}", e);
if e.recoverable {
break;
} else {
@ -198,7 +197,6 @@ fn template_element_string(char_parser: CharParser, reader: &mut Reader) -> Pars
}
}
Ok((c, s)) => {
//eprintln!(">> {:?}", (c, s.clone()));
if s == "{" && bracket {
break;
} else if s == "{" && !bracket {

View File

@ -159,8 +159,7 @@ impl PredicateFunc {
}
PredicateFuncValue::EqualExpression { value: expected, .. } => {
let expected = expected.eval(variables)?;
eprintln!(">> {:?}", expected);
todo!()
todo!(">> {:?}", expected)
}
PredicateFuncValue::CountEqual { value: expected, .. } => {
let expected = expected.to_string();