Skip to content

Commit 128a313

Browse files
committed
Improve docs of core::option::IntoIter
1 parent 5e122f5 commit 128a313

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/libcore/option.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,15 @@ impl<'a, A> FusedIterator for IterMut<'a, A> {}
964964
#[unstable(feature = "trusted_len", issue = "37572")]
965965
unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}
966966

967-
/// An iterator over the item contained inside an [`Option`].
967+
/// An iterator over the value in [`Some`] variant of an [`Option`].
968+
///
969+
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
970+
///
971+
/// This `struct` is created by [`Option::into_iter`] function.
968972
///
969973
/// [`Option`]: enum.Option.html
974+
/// [`Some`]: enum.Option.html#variant.Some
975+
/// [`Option::into_iter`]: enum.Option.html#method.into_iter
970976
#[derive(Clone, Debug)]
971977
#[stable(feature = "rust1", since = "1.0.0")]
972978
pub struct IntoIter<A> { inner: Item<A> }

0 commit comments

Comments
 (0)