Skip to content

Commit

Permalink
Rollup merge of #36589 - jpadkins:option_docs_safety_wording_fix, r=b…
Browse files Browse the repository at this point in the history
…luss

fixed the safety header/wording in option.rs

Fixes #36581

screenshot of the rendered documentation: http://imgur.com/14kLVrA

r? @steveklabnik
  • Loading branch information
Jonathan Turner authored Sep 22, 2016
2 parents a86c83f + 8b02aa1 commit 5d4c0ed
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
/// ```
Expand Down

0 comments on commit 5d4c0ed

Please sign in to comment.