@@ -1136,7 +1136,7 @@ impl<T: Deref, E> Result<T, E> {
1136
1136
///
1137
1137
/// Leaves the original `Result` in-place, creating a new one containing a reference to the
1138
1138
/// `Ok` type's `Deref::Target` type.
1139
- pub fn as_deref_ok ( & self ) -> Result < & T :: Target , & E > {
1139
+ pub fn as_deref ( & self ) -> Result < & T :: Target , & E > {
1140
1140
self . as_ref ( ) . map ( |t| t. deref ( ) )
1141
1141
}
1142
1142
}
@@ -1152,24 +1152,13 @@ impl<T, E: Deref> Result<T, E> {
1152
1152
}
1153
1153
}
1154
1154
1155
- #[ unstable( feature = "inner_deref" , reason = "newly added" , issue = "50264" ) ]
1156
- impl < T : Deref , E : Deref > Result < T , E > {
1157
- /// Converts from `Result<T, E>` (or `&Result<T, E>`) to `Result<&T::Target, &E::Target>`.
1158
- ///
1159
- /// Leaves the original `Result` in-place, creating a new one containing a reference to both
1160
- /// the `Ok` and `Err` types' `Deref::Target` types.
1161
- pub fn as_deref ( & self ) -> Result < & T :: Target , & E :: Target > {
1162
- self . as_ref ( ) . map ( |t| t. deref ( ) ) . map_err ( |e| e. deref ( ) )
1163
- }
1164
- }
1165
-
1166
1155
#[ unstable( feature = "inner_deref" , reason = "newly added" , issue = "50264" ) ]
1167
1156
impl < T : DerefMut , E > Result < T , E > {
1168
1157
/// Converts from `Result<T, E>` (or `&mut Result<T, E>`) to `Result<&mut T::Target, &mut E>`.
1169
1158
///
1170
1159
/// Leaves the original `Result` in-place, creating a new one containing a mutable reference to
1171
1160
/// the `Ok` type's `Deref::Target` type.
1172
- pub fn as_deref_mut_ok ( & mut self ) -> Result < & mut T :: Target , & mut E > {
1161
+ pub fn as_deref_mut ( & mut self ) -> Result < & mut T :: Target , & mut E > {
1173
1162
self . as_mut ( ) . map ( |t| t. deref_mut ( ) )
1174
1163
}
1175
1164
}
@@ -1185,18 +1174,6 @@ impl<T, E: DerefMut> Result<T, E> {
1185
1174
}
1186
1175
}
1187
1176
1188
- #[ unstable( feature = "inner_deref" , reason = "newly added" , issue = "50264" ) ]
1189
- impl < T : DerefMut , E : DerefMut > Result < T , E > {
1190
- /// Converts from `Result<T, E>` (or `&mut Result<T, E>`) to
1191
- /// `Result<&mut T::Target, &mut E::Target>`.
1192
- ///
1193
- /// Leaves the original `Result` in-place, creating a new one containing a mutable reference to
1194
- /// both the `Ok` and `Err` types' `Deref::Target` types.
1195
- pub fn as_deref_mut ( & mut self ) -> Result < & mut T :: Target , & mut E :: Target > {
1196
- self . as_mut ( ) . map ( |t| t. deref_mut ( ) ) . map_err ( |e| e. deref_mut ( ) )
1197
- }
1198
- }
1199
-
1200
1177
impl < T , E > Result < Option < T > , E > {
1201
1178
/// Transposes a `Result` of an `Option` into an `Option` of a `Result`.
1202
1179
///
0 commit comments