Skip to content

Use views in consuming manner, not mutating#89

Merged
blevine1 merged 2 commits into
apple:mainfrom
blevine1:consume-views-not-mutate
Jul 8, 2026
Merged

Use views in consuming manner, not mutating#89
blevine1 merged 2 commits into
apple:mainfrom
blevine1:consume-views-not-mutate

Conversation

@blevine1

@blevine1 blevine1 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Since views are themselves immutable and non-owning, it's best to pass them around as consuming, not inout. Currently this is just a semantic improvement, but CoreAI will be making some of the accessors consuming and thus taking as inout will cause compilation issues since an inout value can't be consumed.

@blevine1 blevine1 requested a review from tjia1818 July 7, 2026 21:38
@blevine1 blevine1 merged commit 7bd9d32 into apple:main Jul 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants