File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -852,15 +852,15 @@ impl Error {
852852 }
853853 }
854854
855- /// Attempt to downcast the inner error to `E` if any .
855+ /// Attempt to downcast the custom boxed error to `E`.
856856 ///
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`] when this contains a custom boxed error,
858+ /// then it would attempt downcasting on the boxed error,
859+ /// otherwise it will return [`Err`].
859860 ///
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`].
862863 ///
863- /// [`new`]: Error::new
864864 ///
865865 /// # Examples
866866 ///
You can’t perform that action at this time.
0 commit comments