Commit e1fd7c7
authored
Require sendable userInfo values in JSON.withEncoding(of:userInfo:_:) (#955)
swift-foundation recently landed a change (in
swiftlang/swift-foundation#764) which requires
`any Sendable` values in `JSONEncoder.userInfo`. This causes a build
failure in swift-testing:
```
JSON.swift:44:28: error: type 'Any' does not conform to the 'Sendable' protocol
42 |
43 | // Set user info keys that clients want to use during encoding.
44 | encoder.userInfo.merge(userInfo, uniquingKeysWith: { _, rhs in rhs})
| `- error: type 'Any' does not conform to the 'Sendable' protocol
```
This PR adjusts our `userInfo:` parameter require `any Sendable` values.
The values we were passing to this utility were already sendable,
luckily.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.1 parent 7493d6e commit e1fd7c7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments