Skip to content

Code quality: Dead code — CLI module and send_state::Done/Confirming never used #11

Description

@daschinmoy21

Severity: Low

Several code paths are effectively dead:

  1. cli.rs defines Send/Receive commands with clap, but main.rs ignores them (empty match arms)
  2. SendState::Done is defined but never transitioned to
  3. SendState::Confirming(DiscoveryPeer) is defined but the TUI goes directly from Discovery to Transferring
  4. ReceiveState::Listening(u16) stores a port but the Receive tab has no actual receive flow yet
  5. Large blocks of commented-out code in tcp_send.rs (lines 216-245) should be removed

Affected Files

  • src/cli.rs (entire file)
  • src/ui/mod.rs (line 44: Confirming, line 45: Done)
  • src/protocol/tcp_send.rs (lines 216-245)

Suggested Fix

  • Either implement the CLI flow or remove the module
  • Replace unused enum variants with TODO comments or remove them
  • Clean up dead code blocks

Issue filed by Hermes — automated code audit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-qualityCode quality improvementlowLow severity

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions