Skip to content

Refactor/remove tautological conditions#27

Open
motixo wants to merge 2 commits into
ShahabSL:mainfrom
motixo:refactor/remove-tautological-conditions
Open

Refactor/remove tautological conditions#27
motixo wants to merge 2 commits into
ShahabSL:mainfrom
motixo:refactor/remove-tautological-conditions

Conversation

@motixo

@motixo motixo commented May 24, 2026

Copy link
Copy Markdown
  • Remove redundant 'err != nil' check in existingDefaultKitDir (instances.go)
    Error is already guaranteed to be non-nil in the else branch of 'if err == nil'

  • Remove two redundant 'err != nil' checks in uninstallWireproxy (uninstall.go)
    Both in else branches where error is already guaranteed to be non-nil

  • Remove redundant 'stream != nil' check in normalReceivePauseStateForStream (mux.go)
    Stream parameter is validated with early return, making the check unnecessary"

motixo added 2 commits May 25, 2026 01:26
- Remove normalizeMuxTransport function which always returned 'muxv4'
- Replace function call with literal 'muxv4' string in driveMux initialization
- Remove redundant test case for normalizeMuxTransport
- Remove redundant 'err != nil' check in existingDefaultKitDir (instances.go)
  Error is already guaranteed to be non-nil in the else branch of 'if err == nil'

- Remove two redundant 'err != nil' checks in uninstallWireproxy (uninstall.go)
  Both in else branches where error is already guaranteed to be non-nil

- Remove redundant 'stream != nil' check in normalReceivePauseStateForStream (mux.go)
  Stream parameter is validated with early return, making the check unnecessary
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.

1 participant