docs: alias limit to Iterator::take, cite [u8]::utf8_chunks in Utf8Chunks

This commit is contained in:
Lieselotte 2025-05-02 23:41:52 +02:00
parent 7c96085b64
commit 415a73e3eb
No known key found for this signature in database
GPG key ID: 68A9A951C7E1F283
2 changed files with 3 additions and 0 deletions

View file

@ -1358,6 +1358,7 @@ pub trait Iterator {
/// ```
///
/// [`by_ref`]: Iterator::by_ref
#[doc(alias = "limit")]
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
fn take(self, n: usize) -> Take<Self>

View file

@ -147,12 +147,14 @@ impl fmt::Debug for Debug<'_> {
/// An iterator used to decode a slice of mostly UTF-8 bytes to string slices
/// ([`&str`]) and byte slices ([`&[u8]`][byteslice]).
///
/// This struct is created by the [`utf8_chunks`] method on bytes slices.
/// If you want a simple conversion from UTF-8 byte slices to string slices,
/// [`from_utf8`] is easier to use.
///
/// See the [`Utf8Chunk`] type for documentation of the items yielded by this iterator.
///
/// [byteslice]: slice
/// [`utf8_chunks`]: slice::utf8_chunks
/// [`from_utf8`]: super::from_utf8
///
/// # Examples