chore: remove some dbg macros

This commit is contained in:
rvcas 2024-03-29 11:28:22 -04:00
parent 21b1e29f09
commit ce2c723d0c
No known key found for this signature in database
GPG Key ID: C09B64E263F7D68C
3 changed files with 12 additions and 10 deletions

View File

@ -42,12 +42,16 @@ pub fn parser() -> impl Parser<Token, ast::UntypedDefinition, Error = ParseError
}, },
)); ));
let fun = functions
.next()
.expect("unwrapping safe because there's 'at_least(1)' function");
let other_fun = functions.next();
ast::UntypedDefinition::Validator(ast::Validator { ast::UntypedDefinition::Validator(ast::Validator {
doc: None, doc: None,
fun: functions fun,
.next() other_fun,
.expect("unwrapping safe because there's 'at_least(1)' function"),
other_fun: functions.next(),
location: ast::Span { location: ast::Span {
start: span.start, start: span.start,
// capture the span from the optional params // capture the span from the optional params

View File

@ -95,8 +95,6 @@ fn bls12_381_ml_result_in_data_type() {
let res = check(parse(source_code)); let res = check(parse(source_code));
dbg!(&res);
assert!(matches!(res, Err((_, Error::IllegalTypeInData { .. })))) assert!(matches!(res, Err((_, Error::IllegalTypeInData { .. }))))
} }
@ -1912,7 +1910,7 @@ fn forbid_partial_down_casting() {
"#; "#;
assert!(matches!( assert!(matches!(
dbg!(check(parse(source_code))), check(parse(source_code)),
Err((_, Error::CouldNotUnify { .. })) Err((_, Error::CouldNotUnify { .. }))
)) ))
} }
@ -1931,7 +1929,7 @@ fn forbid_partial_up_casting() {
"#; "#;
assert!(matches!( assert!(matches!(
dbg!(check(parse(source_code))), check(parse(source_code)),
Err((_, Error::CouldNotUnify { .. })) Err((_, Error::CouldNotUnify { .. }))
)) ))
} }

View File

@ -318,13 +318,13 @@ fn infer_definition(
Ok(other_typed_fun) Ok(other_typed_fun)
}) })
.transpose(); .transpose()?;
Ok(Definition::Validator(Validator { Ok(Definition::Validator(Validator {
doc, doc,
end_position, end_position,
fun: typed_fun, fun: typed_fun,
other_fun: typed_other_fun?, other_fun: typed_other_fun,
location, location,
params: typed_params, params: typed_params,
})) }))