about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorJohn Arundel <john@bitfieldconsulting.com>2024-07-15 12:26:30 +0100
committerJohn Arundel <john@bitfieldconsulting.com>2024-07-26 13:26:33 +0100
commita19472a93e2eecce1477011fa9f7ec49b45ca164 (patch)
tree3b7cee954a0c37ee98fbedd430fbf46a2ea12559 /library/core/src/array
parent83d67685acb520fe68d5d5adde4b25fb725490de (diff)
downloadrust-a19472a93e2eecce1477011fa9f7ec49b45ca164.tar.gz
rust-a19472a93e2eecce1477011fa9f7ec49b45ca164.zip
Fix doc nits
Many tiny changes to stdlib doc comments to make them consistent (for example
"Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph
breaks, backticks for monospace style, and other minor nits.

https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/ascii.rs4
-rw-r--r--library/core/src/array/iter.rs6
2 files changed, 6 insertions, 4 deletions
diff --git a/library/core/src/array/ascii.rs b/library/core/src/array/ascii.rs
index 3fea9a44049..05797b042ee 100644
--- a/library/core/src/array/ascii.rs
+++ b/library/core/src/array/ascii.rs
@@ -2,7 +2,7 @@ use crate::ascii;
 
 #[cfg(not(test))]
 impl<const N: usize> [u8; N] {
-    /// Converts this array of bytes into a array of ASCII characters,
+    /// Converts this array of bytes into an array of ASCII characters,
     /// or returns `None` if any of the characters is non-ASCII.
     ///
     /// # Examples
@@ -29,7 +29,7 @@ impl<const N: usize> [u8; N] {
         }
     }
 
-    /// Converts this array of bytes into a array of ASCII characters,
+    /// Converts this array of bytes into an array of ASCII characters,
     /// without checking whether they're valid.
     ///
     /// # Safety
diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs
index 3585bf07b59..617fd627c92 100644
--- a/library/core/src/array/iter.rs
+++ b/library/core/src/array/iter.rs
@@ -47,8 +47,10 @@ impl<T, const N: usize> IntoIterator for [T; N] {
     type IntoIter = IntoIter<T, N>;
 
     /// Creates a consuming iterator, that is, one that moves each value out of
-    /// the array (from start to end). The array cannot be used after calling
-    /// this unless `T` implements `Copy`, so the whole array is copied.
+    /// the array (from start to end).
+    ///
+    /// The array cannot be used after calling this unless `T` implements
+    /// `Copy`, so the whole array is copied.
     ///
     /// Arrays have special behavior when calling `.into_iter()` prior to the
     /// 2021 edition -- see the [array] Editions section for more information.