Skip to content

crates/cli/src/main.rs computes includes twice in a row — the first binding is dead code #373

Description

@unrealtim-tech

Labels: bug, cli-crate, dead-code
Crate: cli

Description
In the Commands::Scan handler, two consecutive let bindings compute the same value, with the first entirely discarded:

let includes: Vec<String> = include.into_iter().collect();
let includes: Vec<String> = include;

(crates/cli/src/main.rs:316-317). The first line's .into_iter().collect() result is immediately shadowed and never used; only the second, simpler include move takes effect. This is leftover debris — almost certainly from an edit that changed include's type without removing the now-redundant original conversion — and would be flagged once CI's clippy gate actually runs against a compiling workspace.

Acceptance Criteria

  • Remove the dead first let includes = ... line, keeping only let includes: Vec<String> = include; (or fold the logic into a single statement).

Difficulty: beginner

Activity

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions