You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0465-nonescapable-stdlib-primitives.md
+4-10Lines changed: 4 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -241,7 +241,7 @@ We generalize `Result` along the same lines as `Optional`, allowing its `success
241
241
242
242
Important convenience APIs such as `Result.init(catching:)` or `Result.map` will need to require escapability until we introduce a way to formally specify lifetime dependencies. This is unfortunate, but it still enables intrepid Swift developers to experiment with defining interfaces that take (or perhaps even return!) `Result` values.
243
243
244
-
However, we are already able to generalize a small handful of methods: `get` and the two error-mapping utilities,`mapError` and `flatMapError`.
244
+
However, we are already able to generalize a couple of methods: `get` and the error-mapping utility`mapError`.
extensionResult: Sendable where Success:Sendable & ~Copyable & ~Escapable {}
526
526
```
527
527
528
-
We postpone generalizing most of the higher-order functions that make `Result` convenient to use, as we currently lack the means to reason about lifetime dependencies for such functions. But we are already able to generalize the two functions that do not have complicated lifetime semantics: `mapError` and `flatMapError`.
528
+
We postpone generalizing most of the higher-order functions that make `Result` convenient to use, as we currently lack the means to reason about lifetime dependencies for such functions. But we are already able to generalize the one function that does not have complicated lifetime semantics: `mapError`.
0 commit comments