-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Inconsistent parameter name "capacity" #60271
Copy link
Copy link
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I've been told that parameter names are not part of the API, so this might not matter at all (except to pedantic people like me):
I've found 17 functions with the name
with_capacity(): https://doc.rust-lang.org/stable/std/index.html?search=with_capacityMost of them use
capacityas parameter name:Some functions, however, use
capas argument name:Others are using
n:Wouldn't it make sense to call all of them
capacity?Does anyone care about such things?
If yes, we could play the same game with
swap()and probably with other common functions.