Skip to content

Commit 46ba3f2

Browse files
authored
Update doc for std::io::Error::downcast
1 parent 2fea2cd commit 46ba3f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

std/src/io/error.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -854,13 +854,17 @@ impl Error {
854854

855855
/// Attempt to downcast the custom boxed error to `E`.
856856
///
857-
/// If this [`Error`] when this contains a custom boxed error,
857+
/// If this [`Error`] contains a custom boxed error,
858858
/// then it would attempt downcasting on the boxed error,
859859
/// otherwise it will return [`Err`].
860860
///
861861
/// If the custom boxed error has the same type as `E`, it will return [`Ok`],
862862
/// otherwise it will also return [`Err`].
863863
///
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`].
867+
///
864868
///
865869
/// # Examples
866870
///

0 commit comments

Comments
 (0)