cargo-public-api icon indicating copy to clipboard operation
cargo-public-api copied to clipboard

Ignore `_`-prefixes of parameter names of trait `impl`s `fn`s

Open epage opened this issue 8 months ago • 3 comments

I can see this being debatable for regular methods.

  • The name could be viewed as documentation
  • Name changes could imply a change in semantic meaning

However, where this is unlikely to make a difference is when implementing a trait. There, the parameters are required and adding/removing _ is more likely to happen (particularly with APIs like serde) and the names are less likely to be normative, instead the trait definition's name would be. In some rare cases, maybe some traits will be undefined / generic enough that an impl can provide enough context.

epage avatar Apr 30 '25 20:04 epage