File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -852,15 +852,19 @@ impl Error {
852
852
}
853
853
}
854
854
855
- /// Attempt to downcast the inner error to `E` if any .
855
+ /// Attempt to downcast the custom boxed error to `E`.
856
856
///
857
- /// If this [`Error`] was constructed via [`new`] then this function will
858
- /// attempt to perform downgrade on it, otherwise it will return [`Err`].
857
+ /// If this [`Error`] contains a custom boxed error,
858
+ /// then it would attempt downcasting on the boxed error,
859
+ /// otherwise it will return [`Err`].
859
860
///
860
- /// If the downcast succeeds, it will return [`Ok`], otherwise it will also
861
- /// return [`Err`].
861
+ /// If the custom boxed error has the same type as `E`, it will return [`Ok`],
862
+ /// otherwise it will also return [`Err`].
863
+ ///
864
+ /// This method is meant to be a convenience routine for calling
865
+ /// `Box<dyn Error + Sync + Send>::downcast` on the custom boxed error, returned by
866
+ /// [`Error::into_inner`].
862
867
///
863
- /// [`new`]: Error::new
864
868
///
865
869
/// # Examples
866
870
///
You can’t perform that action at this time.
0 commit comments