Skip to content

preprocess.rs:107: Language::Yaml/Toml/Json arm is dead code — wildcard _ already matches #1576

Description

@EffortlessSteven

In crates/diffguard-domain/src/preprocess.rs:107, the match arm:

Language::Yaml | Language::Toml | Language::Json => StringSyntax::CStyle,
// All other languages (C, C++, Java, etc.) use C-style strings
_ => StringSyntax::CStyle,

The wildcard arm _ already covers Yaml, Toml, and Json — the explicit arm is identical dead code. The wildcard comment even says "All other languages" implying it was meant to exclude these.

Fix: Remove the | Language::Yaml | Language::Toml | Language::Json from line 107, leaving only the wildcard arm (or move it above the wildcard if ordering matters for clarity).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions