From 65af429c681e874bee6fb3a864ae3496517a72f4 Mon Sep 17 00:00:00 2001 From: Ethan Brierley Date: Tue, 24 Sep 2019 20:19:32 +0100 Subject: Stabilize `Option::flatten` --- src/libcore/option.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 47e3a0d2167..a0f09fabb34 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -1568,7 +1568,6 @@ impl Option> { /// # Examples /// Basic usage: /// ``` - /// #![feature(option_flattening)] /// let x: Option> = Some(Some(6)); /// assert_eq!(Some(6), x.flatten()); /// @@ -1580,13 +1579,12 @@ impl Option> { /// ``` /// Flattening once only removes one level of nesting: /// ``` - /// #![feature(option_flattening)] /// let x: Option>> = Some(Some(Some(6))); /// assert_eq!(Some(Some(6)), x.flatten()); /// assert_eq!(Some(6), x.flatten().flatten()); /// ``` #[inline] - #[unstable(feature = "option_flattening", issue = "60258")] + #[stable(feature = "option_flattening", since = "1.40.0")] pub fn flatten(self) -> Option { self.and_then(convert::identity) } -- cgit 1.4.1-3-g733a5