Skip to content

Conversation

@jmschonfeld
Copy link
Contributor

This PR contains a handful of small, assorted updates to Data's implementation to clean up some of the implementation and prepare it for further evolution. The changes include:

  • Using withUnsafeTemporaryAllocation instead of a custom inline buffer tuple
  • Updating import statements to fix build errors when building for Darwin
  • Updating deprecated APIs to use other equivalent public API entry points instead of internal _Representation entrypoints
  • Move copyBytes(to:) (a requirement of the DataProtocol protocol) to the DataProtocol file instead of the main Data.swift
  • Avoid calling .count twice on a buffer
  • Update Data's custom mirror representation to match the children size of Array (up to 256 elements)

@jmschonfeld jmschonfeld requested a review from glessard October 29, 2025 20:12
@jmschonfeld jmschonfeld merged commit 3b7d7c8 into swiftlang:future Oct 29, 2025
18 checks passed
@jmschonfeld jmschonfeld deleted the continued-data-updates branch October 29, 2025 23:32
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