From 9fed7d0bde7dbcce1f1128a9f5e1e6e52b4c0d52 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Tue, 23 Nov 2021 10:25:16 +0000 Subject: [PATCH] docs: Mention anyhow for error handling in UT doc Add a comment stating that `anyhow` and `thiserror` should be used in real rust code, rather than the unwieldy default `Result` handling shown in the example. Signed-off-by: James O. D. Hunt --- docs/Unit-Test-Advice.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Unit-Test-Advice.md b/docs/Unit-Test-Advice.md index e88d8acf0..07af3922f 100644 --- a/docs/Unit-Test-Advice.md +++ b/docs/Unit-Test-Advice.md @@ -120,6 +120,8 @@ Assume the following function: ```rust // Convenience type to allow Result return types to only specify the type // for the true case; failures are specified as static strings. +// XXX: This is an example. In real code use the "anyhow" and +// XXX: "thiserror" crates. pub type Result = std::result::Result; // The function under test.