Skip to content

single-char-push-str: expand to catch insert_str(n, "x") and suggest insert() #6026

@matthiaskrgr

Description

@matthiaskrgr

The single-char-push-str lint looks for single-char &strs added to Strings via push_str() and suggests push().

It should be extended to also catch insert_str(n, "a") with single char args and suggest insert(n, 'a').

Metadata

Metadata

Assignees

Labels

C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesL-perfLint: Belongs in the perf lint groupL-styleLint: Belongs in the style lint group

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions