Skip to content

linter: remove unnecessary codegen #11098

@shulaoda

Description

@shulaoda

Some codegen are only used for print_str, so we can replace them with simple String values.

let mut code = fixer.codegen();
code.print_str("code");

to

let mut code = String::with_capacity(4);
code.push_str("code");

Metadata

Metadata

Assignees

Labels

A-linterArea - LinterC-performanceCategory - Solution not expected to change functional behavior, only performance

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions