Skip to content

Commit 029ace4

Browse files
committed
Improve docs of core::option::IterMut
1 parent 128a313 commit 029ace4

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
@@ -933,9 +933,15 @@ impl<'a, A> Clone for Iter<'a, A> {
933933
}
934934
}
935935

936-
/// An iterator over a mutable reference of the contained item in an [`Option`].
936+
/// An iterator over a mutable reference to the [`Some`] variant of an [`Option`].
937+
///
938+
/// The iterator yields one value if the [`Option`] is a [`Some`] variant, otherwise none.
939+
///
940+
/// This `struct` is created by [`Option::iter_mut`] function.
937941
///
938942
/// [`Option`]: enum.Option.html
943+
/// [`Some`]: enum.Option.html#variant.Some
944+
/// [`Option::iter_mut`]: enum.Option.html#method.iter_mut
939945
#[stable(feature = "rust1", since = "1.0.0")]
940946
#[derive(Debug)]
941947
pub struct IterMut<'a, A: 'a> { inner: Item<&'a mut A> }

0 commit comments

Comments
 (0)