Skip to content

Vec(Deque)::truncate documentation says 'greater' when it should say 'greater or equal' #115784

Closed
@jplatte

Description

@jplatte

Location

https://doc.rust-lang.org/std/vec/struct.Vec.html#method.truncate

Summary

The documentation currently says

If len is greater than the vector’s current length, this has no effect.

But it also doesn't have an effect if the two lengths are equal, so I think it should say "greater or equal to the vector's current length".

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions