Skip to content

Conversation

@czechboy0
Copy link
Contributor

Motivation

Fixes #77.

Users might create a value of a non-copyable type and return it from one of the watch methods. Today, that's not possible, because the Return type implicitly requires Copyable. But that's just because it's the default, we don't do any copying in the watch methods themselves, so we can relax it.

Modifications

Allow returning non-copyable values from watch methods.

Result

Easier usage of non-copyable types with Swift Configuration.

Test Plan

Adapted tests, all pass.

@czechboy0 czechboy0 requested a review from FranzBusch November 24, 2025 12:30
@czechboy0 czechboy0 added the 🆕 semver/minor Adds new public API. label Nov 24, 2025
@czechboy0 czechboy0 merged commit df161c8 into apple:main Nov 24, 2025
26 of 27 checks passed
@czechboy0 czechboy0 deleted the hd-return-noncopyable branch November 24, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow returning non-copyable types in with-style methods

2 participants