Skip to content

Commit 6487b05

Browse files
committed
weak attempt at clarifying compiler error
1 parent b9bdc6f commit 6487b05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/FoundationEssentials/String/String+IO.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,8 @@ extension StringProtocol {
456456
let options : Data.WritingOptions = useAuxiliaryFile ? [.atomic] : []
457457
#endif
458458

459-
try writeToFile(path: .path(String(path)), buffer: data.bytes, options: options, attributes: attributes, reportProgress: false)
459+
let bytes = data.bytes
460+
try writeToFile(path: .path(String(path)), buffer: bytes, options: options, attributes: attributes, reportProgress: false)
460461
}
461462

462463
/// Writes the contents of the `String` to the URL specified by url using the specified encoding.

0 commit comments

Comments
 (0)