rust-lang / rust-lang/rust-clippy

Graduate manual_string_new to clippy::style

Open
#10,284 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-category
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

manual_string_new is a rule that standardizes how empty strings are created, which is not only a good style option (with no known false-positives in the docs), but also helps prevent against zero-width characters being submitted internally.

The Pull Request (#9366) that moved this to pedantic referred to it as:

  • a fairly minor style change
  • could be very noisy

However, not only are many existing non-pedantic style lints noisy (as they can appear a lot), but this one is also idiomatic and uses an in-built method to create an empty string.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the manual_string_new rule documentation linked in the issue and review Pull Request #9366 for the rationale behind its current classification. Confirm the implications of moving the rule to clippy::style; done means the classification is updated without changing the rule's behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.