]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #107776 - dbrgn:docs-string-reserve-headings, r=cuviper
authorMatthias Krüger <matthias.krueger@famsik.de>
Wed, 8 Feb 2023 06:13:28 +0000 (07:13 +0100)
committerGitHub <noreply@github.com>
Wed, 8 Feb 2023 06:13:28 +0000 (07:13 +0100)
Docs: Fix format of headings in String::reserve

It was inconsistent with other doc comments in the same module (and the rest of the rust std docs).

library/alloc/src/string.rs

index ca182c8109ec97d3f1ad5dc01353a342e656d0f2..7565918851554bd5de13ae1f88ba4ef551fd3119 100644 (file)
@@ -928,12 +928,12 @@ pub fn push_str(&mut self, string: &str) {
 
     /// Copies elements from `src` range to the end of the string.
     ///
-    /// ## Panics
+    /// # Panics
     ///
     /// Panics if the starting point or end point do not lie on a [`char`]
     /// boundary, or if they're out of bounds.
     ///
-    /// ## Examples
+    /// # Examples
     ///
     /// ```
     /// #![feature(string_extend_from_within)]