We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
From
&mut Option<T>
1 parent 0cde1cb commit a7a0225Copy full SHA for a7a0225
src/libcore/option.rs
@@ -1071,6 +1071,13 @@ impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
1071
}
1072
1073
1074
+#[stable(feature = "option_ref_from_ref_option", since = "1.30.0")]
1075
+impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T> {
1076
+ fn from(o: &'a mut Option<T>) -> Option<&'a mut T> {
1077
+ o.as_mut()
1078
+ }
1079
+}
1080
+
1081
/////////////////////////////////////////////////////////////////////////////
1082
// The Option Iterators
1083
0 commit comments