From c09b7eb3b1efc3a5993c608019621ba1c9bb6fad Mon Sep 17 00:00:00 2001 From: ljedrz Date: Tue, 6 Oct 2020 12:35:42 +0200 Subject: [PATCH] clippy: fix if_same_then_else Signed-off-by: ljedrz --- compiler/src/statement/return_/return_.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/src/statement/return_/return_.rs b/compiler/src/statement/return_/return_.rs index ddd11904f6..56217532b2 100644 --- a/compiler/src/statement/return_/return_.rs +++ b/compiler/src/statement/return_/return_.rs @@ -28,9 +28,7 @@ fn check_return_type(expected: Option, 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));