Skip to content

Commit 28423c1

Browse files
committed
Rename internal functions
1 parent ea9a680 commit 28423c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/FoundationEssentials/Data/Data+Base64.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ extension Base64 {
337337

338338
if let result = bytes.withContiguousStorageIfAvailable({ input -> [UInt8] in
339339
[UInt8](unsafeUninitializedCapacity: newCapacity) { buffer, length in
340-
Self._encodeChromium(input: input, buffer: buffer, length: &length, options: options)
340+
Self._encode(input: input, buffer: buffer, length: &length, options: options)
341341
}
342342
}) {
343343
return result
@@ -355,7 +355,7 @@ extension Base64 {
355355
if let result = bytes.withContiguousStorageIfAvailable({ input -> String in
356356
String(unsafeUninitializedCapacity: newCapacity) { buffer -> Int in
357357
var length = newCapacity
358-
Self._encodeChromium(input: input, buffer: buffer, length: &length, options: options)
358+
Self._encode(input: input, buffer: buffer, length: &length, options: options)
359359
return length
360360
}
361361
}) {
@@ -379,7 +379,7 @@ extension Base64 {
379379
_ = data.withUnsafeMutableBytes { rawBuffer in
380380
rawBuffer.withMemoryRebound(to: UInt8.self) { buffer in
381381
var length = newCapacity
382-
Self._encodeChromium(input: input, buffer: buffer, length: &length, options: options)
382+
Self._encode(input: input, buffer: buffer, length: &length, options: options)
383383
return length
384384
}
385385
}
@@ -392,9 +392,9 @@ extension Base64 {
392392
}
393393

394394
@usableFromInline
395-
static func _encodeChromium(input: UnsafeBufferPointer<UInt8>, buffer: UnsafeMutableBufferPointer<UInt8>, length: inout Int, options: Data.Base64EncodingOptions) {
395+
static func _encode(input: UnsafeBufferPointer<UInt8>, buffer: UnsafeMutableBufferPointer<UInt8>, length: inout Int, options: Data.Base64EncodingOptions) {
396396
if options.contains(.lineLength64Characters) || options.contains(.lineLength76Characters) {
397-
return self._encodeChromiumWithLineBreaks(input: input, buffer: buffer, length: &length, options: options)
397+
return self._encodeWithLineBreaks(input: input, buffer: buffer, length: &length, options: options)
398398
}
399399

400400
let omitPaddingCharacter = false // options.contains(.omitPaddingCharacter)
@@ -450,7 +450,7 @@ extension Base64 {
450450
}
451451
}
452452

453-
static func _encodeChromiumWithLineBreaks(
453+
static func _encodeWithLineBreaks(
454454
input: UnsafeBufferPointer<UInt8>,
455455
buffer: UnsafeMutableBufferPointer<UInt8>,
456456
length: inout Int,

0 commit comments

Comments
 (0)