Skip to content

Commit 86cbdfc

Browse files
committed
Refer to Error::source() instead of deprecated cause()
1 parent 7894a48 commit 86cbdfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/interoperability.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ An error type is any type `E` used in a `Result<T, E>` returned by any public
200200
function of your crate. Error types should always implement the
201201
[`std::error::Error`] trait which is the mechanism by which error handling
202202
libraries like [`error-chain`] abstract over different types of errors, and
203-
which allows the error to be used as the [`cause()`] of another error.
203+
which allows the error to be used as the [`source()`] of another error.
204204

205205
[`std::error::Error`]: https://doc.rust-lang.org/std/error/trait.Error.html
206206
[`error-chain`]: https://docs.rs/error-chain
207-
[`cause()`]: https://doc.rust-lang.org/std/error/trait.Error.html#method.cause
207+
[`source()`]: https://doc.rust-lang.org/std/error/trait.Error.html#method.source
208208

209209
Additionally, error types should implement the [`Send`] and [`Sync`] traits. An
210210
error that is not `Send` cannot be returned by a thread run with

0 commit comments

Comments
 (0)