Skip to content

Commit cd244ad

Browse files
replaced two generic parameters with equivalent some replacements
1 parent 4401664 commit cd244ad

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Sources/HTMLKitParse/ExpandHTMLMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extension HTMLEncoding {
5555
return encoded.replacingOccurrences(of: "$0", with: string)
5656
}
5757
}
58-
private func bytes<T: FixedWidthInteger>(_ bytes: [T]) -> String {
58+
private func bytes(_ bytes: [some FixedWidthInteger]) -> String {
5959
var string = "["
6060
for b in bytes {
6161
string += "\(b),"

Sources/HTMLKitUtilities/HTMLInitializable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension HTMLInitializable {
1616
@inlinable
1717
public func unwrap<T>(_ value: T?, suffix: String? = nil) -> String? {
1818
guard let value else { return nil }
19-
return "\(value)" + (suffix ?? "")
19+
return "\(value)\(suffix ?? "")"
2020
}
2121

2222
@inlinable

Sources/HTMLKitUtilities/HTMLOptimizedLiteral.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public struct HTMLOptimizedLiteral<each Literal: TextOutputStreamable> {
2626

2727
extension StaticString: @retroactive TextOutputStreamable {
2828
@inlinable
29-
public func write<Target: TextOutputStream>(to target: inout Target) {
29+
public func write(to target: inout some TextOutputStream) {
3030
self.withUTF8Buffer { buffer in
3131
target.write(String(decoding: buffer, as: UTF8.self))
3232
}

Tests/HTMLKitTests/ResultTypeTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extension ResultTypeTests {
5656
var chunks:[String] = #html(resultType: .chunks()) {
5757
div("oh yeah")
5858
}
59-
#expect(chunks == [expected])//
59+
#expect(chunks == [expected])
6060

6161
chunks = #html(resultType: .chunks(chunkSize: 3)) {
6262
div("oh \(yeah)")

0 commit comments

Comments
 (0)