From b5a94a45d3888dc56ca4a8119149f1ab12465846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Saparelli?= Date: Sat, 25 Apr 2020 16:31:29 +1200 Subject: [PATCH] Fix strings on last few examples --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 33aad47..61878c0 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ anyhow the following is valid. ```rust // Works -let val = get_optional_val.ok_or_else(|| anyhow!("failed to get value)).unwrap(); +let val = get_optional_val.ok_or_else(|| anyhow!("failed to get value")).unwrap(); ``` Where as with `eyre!` this will fail due to being unable to infer the type for @@ -307,10 +307,10 @@ via your return type or a type annotation. ```rust // Broken -let val = get_optional_val.ok_or_else(|| eyre!("failed to get value)).unwrap(); +let val = get_optional_val.ok_or_else(|| eyre!("failed to get value")).unwrap(); // Works -let val: Report = get_optional_val.ok_or_else(|| eyre!("failed to get value)).unwrap(); +let val: Report = get_optional_val.ok_or_else(|| eyre!("failed to get value")).unwrap(); ``` [Report]: https://docs.rs/eyre/*/eyre/struct.Report.html [`eyre::EyreContext`]: https://docs.rs/eyre/*/eyre/trait.EyreContext.html