Skip to content

Commit

Permalink
Rollup merge of rust-lang#114223 - ryanoneill:vec-indexing-doc-langua…
Browse files Browse the repository at this point in the history
…ge, r=workingjubilee

Documentation: Fix Stilted Language in Vec->Indexing

Problem

Language in the Vec->Indexing documentation sounds stilted due to incorrect word ordering: "... type allows to access values by index."

Solution

Reorder words in the Vec->Indexing documentation to flow better: "... type allows access to values by index." The phrase "allows access to" also matches other existing documentation.
  • Loading branch information
matthiaskrgr authored Jul 30, 2023
2 parents 7492cf9 + 9a01a23 commit 593b2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ mod spec_extend;
///
/// # Indexing
///
/// The `Vec` type allows to access values by index, because it implements the
/// The `Vec` type allows access to values by index, because it implements the
/// [`Index`] trait. An example will be more explicit:
///
/// ```
Expand Down

0 comments on commit 593b2f5

Please sign in to comment.