mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
Use matches macro
This commit is contained in:
parent
46f585e2ff
commit
1a39ae93ca
@ -182,21 +182,11 @@ pub(crate) fn expect_compiler_error(program: EdwardsTestCompiler) -> CompilerErr
|
||||
}
|
||||
|
||||
pub(crate) fn expect_dynamic_check_error(error: CompilerError) {
|
||||
let is_dynamic_check = match error {
|
||||
CompilerError::DynamicCheckError(_) => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
assert!(is_dynamic_check)
|
||||
assert!(matches!(error, CompilerError::DynamicCheckError(_)))
|
||||
}
|
||||
|
||||
pub(crate) fn expect_static_check_error(error: CompilerError) {
|
||||
let is_static_check = match error {
|
||||
CompilerError::StaticCheckError(_) => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
assert!(is_static_check)
|
||||
assert!(matches!(error, CompilerError::StaticCheckError(_)))
|
||||
}
|
||||
|
||||
pub(crate) fn generate_main_input(input: Vec<(&str, Option<InputValue>)>) -> MainInput {
|
||||
|
Loading…
Reference in New Issue
Block a user