Skip to content

Commit

Permalink
swift concurrency (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansergheev authored Oct 21, 2024
1 parent e9497dc commit c00656e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Sources/Html/Attributes.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public struct Attribute<Element> {
public struct Attribute<Element>: Sendable {
public let key: String
public let value: String?

Expand Down Expand Up @@ -468,7 +468,7 @@ extension Attribute where Element == Tag.Form {
return .init("action", value)
}

public struct Enctype: RawRepresentable {
public struct Enctype: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand Down Expand Up @@ -575,7 +575,7 @@ public enum InputType: String {
case week
}

public struct Accept: RawRepresentable {
public struct Accept: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Html/DebugRender.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public struct Config {
public struct Config: Sendable {
public let indentation: String
public let newline: String

Expand Down
18 changes: 9 additions & 9 deletions Sources/Html/MediaType.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public enum MediaType: CustomStringConvertible {
public enum MediaType: CustomStringConvertible, Sendable {
case application(Application)
case audio(Audio)
case font(Font)
Expand Down Expand Up @@ -54,7 +54,7 @@ public enum MediaType: CustomStringConvertible {
}
}

public struct Application: RawRepresentable {
public struct Application: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand All @@ -67,7 +67,7 @@ public struct Application: RawRepresentable {
public static let xWwwFormUrlencoded = Application(rawValue: "x-www-form-url-encoded")
}

public struct Audio: RawRepresentable {
public struct Audio: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand All @@ -80,7 +80,7 @@ public struct Audio: RawRepresentable {
public static let wav = Audio(rawValue: "wav")
}

public struct Font: RawRepresentable {
public struct Font: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand All @@ -95,7 +95,7 @@ public struct Font: RawRepresentable {
public static let woff2 = Audio(rawValue: "woff2")
}

public struct Image: RawRepresentable {
public struct Image: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand All @@ -110,7 +110,7 @@ public struct Image: RawRepresentable {
public static let tiff = Image(rawValue: "tiff")
}

public struct Multipart: RawRepresentable {
public struct Multipart: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand All @@ -124,7 +124,7 @@ public struct Multipart: RawRepresentable {
public static let formData = Multipart(rawValue: "form-data")
}

public struct Text: RawRepresentable {
public struct Text: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand All @@ -137,7 +137,7 @@ public struct Text: RawRepresentable {
public static let plain = Text(rawValue: "plain")
}

public struct Video: RawRepresentable {
public struct Video: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand All @@ -149,7 +149,7 @@ public struct Video: RawRepresentable {
public static let webm = Video(rawValue: "webm")
}

public struct Charset: RawRepresentable {
public struct Charset: RawRepresentable, Sendable {
public let rawValue: String

public init(rawValue: String) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Html/Node.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The basic unit of an HTML tree.
public enum Node {
public enum Node: Sendable {
/// Represents a renderable comment.
case comment(String)

Expand Down

0 comments on commit c00656e

Please sign in to comment.