Skip to content

chore: Remove redundant if block#37

Merged
zfields merged 1 commit intomasterfrom
zak-if
May 1, 2025
Merged

chore: Remove redundant if block#37
zfields merged 1 commit intomasterfrom
zak-if

Conversation

@zfields
Copy link
Copy Markdown
Contributor

@zfields zfields commented May 1, 2025

No description provided.

@zfields zfields requested review from Bucknalla and Copilot May 1, 2025 17:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes a redundant inner conditional check from the main function to streamline the control flow when processing the actionRequest and actionLog flags.

  • Removed an inner if-condition checking for err == nil in the actionRequest block
  • Removed an extra closing brace in the actionLog block that was no longer necessary
Comments suppressed due to low confidence (2)

notecard/main.go:701

  • The removal of the redundant inner 'if err == nil' check in the actionRequest block improves the control flow and reduces unnecessary nesting.
if err == nil {

notecard/main.go:790

  • Removing this extra closing brace aligns the code structure with the updated conditional logic, enhancing clarity.
}

Copy link
Copy Markdown
Collaborator

@Bucknalla Bucknalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to simplify the control flow by removing a redundant nested if block.

  • The check "if err == nil" inside "if err == nil && actionRequest != """ has been removed.
  • A sequence that previously invoked card.TransactionRequest and processed its response has been replaced with a JSON unmarshal call.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes a redundant nested error check in the main function to simplify the control flow.

  • Removed an unnecessary inner "if err == nil" block when the error has already been checked in the outer condition.
  • Removed an extraneous closing brace to maintain proper block structure.

@zfields zfields merged commit b14ccdc into master May 1, 2025
1 check passed
@zfields zfields deleted the zak-if branch May 1, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants