From 7324e05bb596a35e883f80cca575ecab898edf1e Mon Sep 17 00:00:00 2001
From: Leung Yau Ming <leungyauming2005@gmail.com>
Date: Thu, 11 May 2023 19:48:28 +0800
Subject: [PATCH] docs: clarify the absence of the "Error: " prefix in `Debug`
 output

---
 src/lib.rs | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs
index a946a81..2d49b1e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -300,12 +300,12 @@ pub use anyhow as format_err;
 /// Failed to read instrs from ./path/to/instrs.json: No such file or directory (os error 2)
 /// ```
 ///
-/// The Debug format "{:?}" includes your backtrace if one was captured. Note
-/// that this is the representation you get by default if you return an error
-/// from `fn main` instead of printing it explicitly yourself.
+/// The Debug format "{:?}" includes your backtrace if one was captured.
+/// Note that the "Error: " prefix is not included unlike returning an error directly from `fn main`.
+/// For more info, see the implementation of [std::process::Termination] for [std::result::Result].
 ///
 /// ```console
-/// Error: Failed to read instrs from ./path/to/instrs.json
+/// Failed to read instrs from ./path/to/instrs.json
 ///
 /// Caused by:
 ///     No such file or directory (os error 2)
@@ -314,7 +314,7 @@ pub use anyhow as format_err;
 /// and if there is a backtrace available:
 ///
 /// ```console
-/// Error: Failed to read instrs from ./path/to/instrs.json
+/// Failed to read instrs from ./path/to/instrs.json
 ///
 /// Caused by:
 ///     No such file or directory (os error 2)