Improve docs of core::option::IntoIter

This commit is contained in:
Irfan Hudda 2017-04-01 21:58:30 +05:30
parent 5e122f59ba
commit 128a313ee2

View File

@ -964,9 +964,15 @@ impl<'a, A> FusedIterator for IterMut<'a, A> {}
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}
/// An iterator over the item contained inside an [`Option`].
/// An iterator over the value in [`Some`] variant of an [`Option`].
///
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
///
/// This `struct` is created by [`Option::into_iter`] function.
///
/// [`Option`]: enum.Option.html
/// [`Some`]: enum.Option.html#variant.Some
/// [`Option::into_iter`]: enum.Option.html#method.into_iter
#[derive(Clone, Debug)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IntoIter<A> { inner: Item<A> }