This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
+ - [ Remove ` impl Deref<Kind> for Error ` ] ( https://github.com/rust-lang-nursery/error-chain/pull/192 )
4
+
3
5
# 0.11.0
4
6
5
7
- Change last rust version supported to 1.14
Original file line number Diff line number Diff line change @@ -166,11 +166,17 @@ macro_rules! impl_error_chain_processed {
166
166
where F : FnOnce ( ) -> EK , EK : Into <$error_kind_name> {
167
167
$error_name:: with_chain( self , Self :: from_kind( error( ) . into( ) ) )
168
168
}
169
+
170
+ /// A short description of the error.
171
+ /// This method is identical to [`Error::description()`](https://doc.rust-lang.org/nightly/std/error/trait.Error.html#tymethod.description)
172
+ pub fn description( & self ) -> & str {
173
+ self . 0 . description( )
174
+ }
169
175
}
170
176
171
177
impl :: std:: error:: Error for $error_name {
172
178
fn description( & self ) -> & str {
173
- self . 0 . description( )
179
+ self . description( )
174
180
}
175
181
176
182
#[ allow( unknown_lints, unused_doc_comment) ]
@@ -239,14 +245,6 @@ macro_rules! impl_error_chain_processed {
239
245
}
240
246
}
241
247
242
- impl :: std:: ops:: Deref for $error_name {
243
- type Target = $error_kind_name;
244
-
245
- fn deref( & self ) -> & Self :: Target {
246
- & self . 0
247
- }
248
- }
249
-
250
248
251
249
// The ErrorKind type
252
250
// --------------
You can’t perform that action at this time.
0 commit comments