Commit b05a48f
authored
SE-0456 added `Span`-providing properties to standard library types;
Foundation also added `Data.bytes` and `Data.span` accordingly. These
additions subsume the need for the `Data.bytes` and `Span._bytes` shims.
The only caller of `Data.bytes` is `AsyncIO.write(_:to:for:)`, which now
binds to Foundation's accessor. The removed accessor also escaped the
pointer vended by `withUnsafeBytes(_:)`; Foundation's borrowing accessor
avoids this. `DataProtocol.bytes` had no callers and is removed as dead
code.
The only caller of `Span._bytes` is `run(_:input:output:error:)`, which
now uses `input.bytes`. `Buffer.bytes` duplicated the hand-rolled
`RawSpan` construction and now delegates to `Array._bytes`, leaving a
single implementation.
`Array._bytes` remains because `Array.span` does not back-deploy below
macOS 26, but Subprocess deploys to macOS 13. This can move to
`self.span.bytes` once the deployment floor reaches macOS 26.
1 parent c7d98c7 commit b05a48f
5 files changed
Lines changed: 8 additions & 63 deletions
File tree
- Sources/Subprocess
- SubprocessFoundation
- Tests/SubprocessTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 68 | + | |
75 | 69 | | |
76 | 70 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 40 | | |
52 | 41 | | |
53 | 42 | | |
54 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
55 | 48 | | |
56 | 49 | | |
57 | 50 | | |
| |||
Lines changed: 0 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 26 | | |
71 | 27 | | |
72 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| 924 | + | |
| 925 | + | |
924 | 926 | | |
925 | 927 | | |
926 | 928 | | |
| |||
0 commit comments