mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-28 20:14:11 +03:00
clippy: fix if_same_then_else
Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
parent
fe016dc168
commit
c09b7eb3b1
@ -28,9 +28,7 @@ fn check_return_type(expected: Option<Type>, actual: Type, span: Span) -> Result
|
|||||||
match expected {
|
match expected {
|
||||||
Some(expected) => {
|
Some(expected) => {
|
||||||
if expected.ne(&actual) {
|
if expected.ne(&actual) {
|
||||||
if expected.is_self() && actual.is_circuit() {
|
if (expected.is_self() && actual.is_circuit()) || expected.match_array_types(&actual) {
|
||||||
return Ok(());
|
|
||||||
} else if expected.match_array_types(&actual) {
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
} else {
|
} else {
|
||||||
return Err(StatementError::arguments_type(&expected, &actual, span));
|
return Err(StatementError::arguments_type(&expected, &actual, span));
|
||||||
|
Loading…
Reference in New Issue
Block a user