File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ flat_map_option = "warn"
77
77
float_cmp = " warn"
78
78
fn_params_excessive_bools = " warn"
79
79
from_iter_instead_of_collect = " warn"
80
- if_not_else = " allow "
80
+ if_not_else = " warn "
81
81
ignored_unit_patterns = " allow"
82
82
implicit_clone = " warn"
83
83
implicit_hasher = " warn"
Original file line number Diff line number Diff line change @@ -1039,27 +1039,27 @@ impl AbstractSyntaxTree for Call {
1039
1039
parse_args : & [ parse:: Expression ] ,
1040
1040
expected_tys : & [ ResolvedType ] ,
1041
1041
) -> Result < ( ) , Error > {
1042
- if parse_args. len ( ) != expected_tys. len ( ) {
1042
+ if parse_args. len ( ) == expected_tys. len ( ) {
1043
+ Ok ( ( ) )
1044
+ } else {
1043
1045
Err ( Error :: InvalidNumberOfArguments (
1044
1046
expected_tys. len ( ) ,
1045
1047
parse_args. len ( ) ,
1046
1048
) )
1047
- } else {
1048
- Ok ( ( ) )
1049
1049
}
1050
1050
}
1051
1051
1052
1052
fn check_output_type (
1053
1053
observed_ty : & ResolvedType ,
1054
1054
expected_ty : & ResolvedType ,
1055
1055
) -> Result < ( ) , Error > {
1056
- if observed_ty != expected_ty {
1056
+ if observed_ty == expected_ty {
1057
+ Ok ( ( ) )
1058
+ } else {
1057
1059
Err ( Error :: ExpressionTypeMismatch (
1058
1060
expected_ty. clone ( ) ,
1059
1061
observed_ty. clone ( ) ,
1060
1062
) )
1061
- } else {
1062
- Ok ( ( ) )
1063
1063
}
1064
1064
}
1065
1065
You can’t perform that action at this time.
0 commit comments