diff --git a/Sources/FoundationEssentials/String/String+IO.swift b/Sources/FoundationEssentials/String/String+IO.swift index 9288dde10..39cf21b7e 100644 --- a/Sources/FoundationEssentials/String/String+IO.swift +++ b/Sources/FoundationEssentials/String/String+IO.swift @@ -456,8 +456,7 @@ extension StringProtocol { let options : Data.WritingOptions = useAuxiliaryFile ? [.atomic] : [] #endif - let bytes = data.bytes - try writeToFile(path: .path(String(path)), buffer: bytes, options: options, attributes: attributes, reportProgress: false) + try writeToFile(path: .path(String(path)), buffer: data.bytes, options: options, attributes: attributes, reportProgress: false) } /// Writes the contents of the `String` to the URL specified by url using the specified encoding.