mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-19 15:41:36 +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 {
|
||||
Some(expected) => {
|
||||
if expected.ne(&actual) {
|
||||
if expected.is_self() && actual.is_circuit() {
|
||||
return Ok(());
|
||||
} else if expected.match_array_types(&actual) {
|
||||
if (expected.is_self() && actual.is_circuit()) || expected.match_array_types(&actual) {
|
||||
return Ok(());
|
||||
} else {
|
||||
return Err(StatementError::arguments_type(&expected, &actual, span));
|
||||
|
Loading…
Reference in New Issue
Block a user