]> git.lizzy.rs Git - rust.git/commitdiff
Improve docs of core::option::IntoIter
authorIrfan Hudda <irfanhudda@gmail.com>
Sat, 1 Apr 2017 16:28:30 +0000 (21:58 +0530)
committerIrfan Hudda <irfanhudda@gmail.com>
Sat, 1 Apr 2017 16:28:30 +0000 (21:58 +0530)
src/libcore/option.rs

index d997f3592fd76d45842af82c89dede308fa08d68..027d370f88f417e61c6af7e2d47b112c9ec51085 100644 (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> }