Touch up documentation on Error struct

This commit is contained in:
David Tolnay 2019-10-05 23:55:33 -04:00
parent 73c7283505
commit a8ce6e44ec
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -11,14 +11,14 @@ use std::backtrace::{Backtrace, BacktraceStatus};
/// The `Error` type, a wrapper around a dynamic error type.
///
/// `Error` functions a lot like `Box<dyn std::error::Error>`, with these
/// `Error` works a lot like `Box<dyn std::error::Error>`, but with these
/// differences:
///
/// - `Error` requires that the error is `Send`, `Sync`, and `'static`
/// - `Error` guarantees that a backtrace will exist, even if the error type
/// did not provide one
/// - `Error` is represented as a narrow pointer - exactly one word in size,
/// instead of two.
/// - `Error` requires that the error is `Send`, `Sync`, and `'static`.
/// - `Error` guarantees that a backtrace is available, even if the underlying
/// error type does not provide one.
/// - `Error` is represented as a narrow pointer &mdash; exactly one word in
/// size instead of two.
pub struct Error {
inner: Box<ErrorImpl<()>>,
}