Skip to content

diffguard-lsp/config.rs: render_config() uses push_str(&format!(...)) ~15 times — should use write!() macro #600

@EffortlessSteven

Description

@EffortlessSteven

The function in (lines ~100-170) builds a string by calling approximately 15 times in sequence:\n\n\n\nProblem: warns that appended to an existing is inefficient — the intermediate allocation is unnecessary. The idiomatic pattern is to use the macro directly:\n\n\n\nFix: Refactor to use (from ) instead of . The function already returns , so propagation is clean.\n\nPriority: Low (no correctness issue, purely stylistic — but ~15 occurrences in a single function make it a concentrated fix)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions