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:
commit
ef55e757b3
@ -284,7 +284,7 @@ fn current_memory(&self) -> Option<(NonNull<u8>, Layout)> {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Aborts
|
||||
///
|
||||
@ -342,7 +342,7 @@ pub fn try_reserve(&mut self, len: usize, additional: usize) -> Result<(), TryRe
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Aborts
|
||||
///
|
||||
|
@ -445,7 +445,7 @@ pub const fn new() -> Self {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -633,7 +633,7 @@ pub const fn new_in(alloc: A) -> Self {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -896,7 +896,7 @@ pub fn capacity(&self) -> usize {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -926,7 +926,7 @@ pub fn reserve(&mut self, additional: usize) {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -1900,7 +1900,7 @@ fn drop(&mut self) {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -2003,7 +2003,7 @@ pub fn pop(&mut self) -> Option<T> {
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if the new capacity exceeds `isize::MAX` bytes.
|
||||
/// Panics if the new capacity exceeds `isize::MAX` _bytes_.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user