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.
1 parent 5cb2fa4 commit 73f07a4Copy full SHA for 73f07a4
src/libcore/option.rs
@@ -1371,6 +1371,7 @@ impl<T> From<T> for Option<T> {
1371
}
1372
1373
#[stable(feature = "option_ref_from_ref_option", since = "1.30.0")]
1374
+impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
1375
/// Converts from &Option<T> to Option<&T>
1376
///
1377
/// # Examples
@@ -1389,7 +1390,6 @@ impl<T> From<T> for Option<T> {
1389
1390
/// println!("Can still print s: {}", s);
1391
/// assert_eq!(o, Some(18));
1392
/// ```
-impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
1393
fn from(o: &'a Option<T>) -> Option<&'a T> {
1394
o.as_ref()
1395
0 commit comments