-
-
Notifications
You must be signed in to change notification settings - Fork 16.9k
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-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Description
Activity
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-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
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.