Skip to content

Commit 2ccbf0d

Browse files
committed
refactor: remove needless return in display_message error classification
Address CodeRabbit feedback on PR #725: the first branch in the display_message() error classification chain had an early return while the other branches did not. Rather than adding returns to all branches (which clippy flags as needless_return since they're at the end of the function), remove the inconsistent one. The else-if chain already prevents fall-through, making the return redundant. Both display_message() and display_task_result() now use a consistent pattern: set self.error and let the else-if chain handle exclusivity.
1 parent f50ea55 commit 2ccbf0d

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/ui/dashpay/contact_requests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,6 @@ impl ScreenLike for ContactRequests {
10461046
if matches!(message_type, MessageType::Error | MessageType::Warning) {
10471047
if message.contains("Recipient does not have") {
10481048
self.error = Some(DashPayError::RecipientMissingKey);
1049-
return;
10501049
} else if message.contains("ENCRYPTION key") {
10511050
self.error = Some(DashPayError::MissingEncryptionKey);
10521051
} else if message.contains("DECRYPTION key") {

0 commit comments

Comments
 (0)