fixed the safety header/wording in option.rs

This commit is contained in:
jacobpadkins 2016-09-19 17:55:44 -05:00
parent 412a637704
commit 8b02aa1c80

View File

@ -296,16 +296,14 @@ impl<T> Option<T> {
/// Moves the value `v` out of the `Option<T>` if it is `Some(v)`.
///
/// # Panics
///
/// Panics if the self value equals `None`.
///
/// # Safety note
///
/// In general, because this function may panic, its use is discouraged.
/// Instead, prefer to use pattern matching and handle the `None`
/// case explicitly.
///
/// # Panics
///
/// Panics if the self value equals `None`.
///
/// # Examples
///
/// ```