File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Sources/MachOKit/Extension Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ extension String {
14
14
15
15
@_spi ( Support)
16
16
public init ( tuple: CCharTuple16 ) {
17
- var buffer = tuple
18
- self = withUnsafePointer ( to: & buffer. 0 ) {
17
+ self = withUnsafePointer ( to: tuple) {
19
18
let size = MemoryLayout< CCharTuple16> . size
20
19
let data = Data ( bytes: $0, count: size) + [ 0 ]
21
20
return String ( cString: data) ?? " "
@@ -29,8 +28,7 @@ extension String {
29
28
30
29
@_spi ( Support)
31
30
public init ( tuple: CCharTuple32 ) {
32
- var buffer = tuple
33
- self = withUnsafePointer ( to: & buffer. 0 ) {
31
+ self = withUnsafePointer ( to: tuple) {
34
32
let size = MemoryLayout< CCharTuple32> . size
35
33
let data = Data ( bytes: $0, count: size) + [ 0 ]
36
34
return String ( cString: data) ?? " "
You can’t perform that action at this time.
0 commit comments