Skip to content

Commit c414628

Browse files
committed
Improve docs of core::option::Iter
1 parent 029ace4 commit c414628

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
@@ -894,9 +894,15 @@ impl<A> ExactSizeIterator for Item<A> {}
894894
impl<A> FusedIterator for Item<A> {}
895895
unsafe impl<A> TrustedLen for Item<A> {}
896896

897-
/// An iterator over a reference of the contained item in an [`Option`].
897+
/// An iterator over a reference to the [`Some`] variant of an [`Option`].
898+
///
899+
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
900+
///
901+
/// This `struct` is created by [`Option::iter`] function.
898902
///
899903
/// [`Option`]: enum.Option.html
904+
/// [`Some`]: enum.Option.html#variant.Some
905+
/// [`Option::iter`]: enum.Option.html#method.iter
900906
#[stable(feature = "rust1", since = "1.0.0")]
901907
#[derive(Debug)]
902908
pub struct Iter<'a, A: 'a> { inner: Item<&'a A> }

0 commit comments

Comments
 (0)