Skip to content

Commit

Permalink
stabilize option_get_or_insert_default
Browse files Browse the repository at this point in the history
  • Loading branch information
slanterns committed Aug 14, 2024
1 parent 3b8aab7 commit 7921401
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,6 @@ impl<T> Option<T> {
/// # Examples
///
/// ```
/// #![feature(option_get_or_insert_default)]
///
/// let mut x = None;
///
/// {
Expand All @@ -1664,7 +1662,7 @@ impl<T> Option<T> {
/// assert_eq!(x, Some(7));
/// ```
#[inline]
#[unstable(feature = "option_get_or_insert_default", issue = "82901")]
#[stable(feature = "option_get_or_insert_default", since = "CURRENT_RUSTC_VERSION")]
pub fn get_or_insert_default(&mut self) -> &mut T
where
T: Default,
Expand Down

0 comments on commit 7921401

Please sign in to comment.