From dec4a2a2b38487cd17394ec8e9a1bc6d2e830f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Bystr=C3=B6m=20Ericsson?= Date: Sat, 19 Oct 2024 03:57:34 +0200 Subject: [PATCH] Cleanup (#114). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ccd9d569..c15a0865 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ func sumsquare(a: T, b: T) throws -> T { #### Expectation: `unwrap(_:)`, `unchecked(_:)` -What about expectations? Sometimes, you declare a fallible function call that should never produce an error; the function only happens to be generalized beyond the scope of the call site. In these cases, an error would indicate a program with unspecified behavior. Consider using `unwrap(_:)` to stop program execution and `unchecked(_:)` to stop program execution of unoptimized builds only. Additionally, you may pass a clarifying comment for debugging purposes. +What about expectations? Sometimes, you make a fallible function call that should never produce an error; the function only happens to be generalized beyond the scope of the call site. In that case, an error would indicate program misbehavior. Consider using `unwrap(_:)` to stop program execution and `unchecked(_:)` to stop program execution of unoptimized builds only. Additionally, you may pass a clarifying comment for debugging purposes. ```swift U8.min.incremented().unwrap("precondition") // must not fail