Rollup merge of #119374 - gurry:119149-improve-vec-docs, r=cuviper

Italicise "bytes" in the docs of some `Vec` methods

On a cursory read it's easy to miss that the limit is in terms of bytes not no. of elements. The italics should help with that.

Fixes #119149
This commit is contained in:
Matthias Krüger 2023-12-29 21:40:22 +01:00 committed by GitHub
commit ef55e757b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -284,7 +284,7 @@ fn current_memory(&self) -> Option<(NonNull<u8>, Layout)> {
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Aborts /// # Aborts
/// ///
@ -342,7 +342,7 @@ pub fn try_reserve(&mut self, len: usize, additional: usize) -> Result<(), TryRe
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Aborts /// # Aborts
/// ///

View File

@ -445,7 +445,7 @@ pub const fn new() -> Self {
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Examples /// # Examples
/// ///
@ -633,7 +633,7 @@ pub const fn new_in(alloc: A) -> Self {
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Examples /// # Examples
/// ///
@ -896,7 +896,7 @@ pub fn capacity(&self) -> usize {
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Examples /// # Examples
/// ///
@ -926,7 +926,7 @@ pub fn reserve(&mut self, additional: usize) {
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Examples /// # Examples
/// ///
@ -1900,7 +1900,7 @@ fn drop(&mut self) {
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Examples /// # Examples
/// ///
@ -2003,7 +2003,7 @@ pub fn pop(&mut self) -> Option<T> {
/// ///
/// # Panics /// # Panics
/// ///
/// Panics if the new capacity exceeds `isize::MAX` bytes. /// Panics if the new capacity exceeds `isize::MAX` _bytes_.
/// ///
/// # Examples /// # Examples
/// ///