Skip to content

Commit b2620a6

Browse files
committed
revert async tag init
1 parent 885f0ca commit b2620a6

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

Sources/SwiftSgml/Tag.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ open class Tag {
3232
self.init(builder())
3333
}
3434

35-
/// initialize a new Tag with children using an async throwing builder
36-
public convenience init(@TagBuilder _ builder: () async throws -> [Tag]) async throws {
37-
self.init(try await builder())
38-
}
35+
// /// initialize a new Tag with children using an async throwing builder
36+
// public convenience init(@TagBuilder _ builder: () async throws -> [Tag]) async throws {
37+
// self.init(try await builder())
38+
// }
3939

4040

4141
/// initialize a new Tag with some contents

Tests/SwiftSgmlTests/TagTests.swift

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ final class TagTests: XCTestCase {
2323
""")
2424
}
2525

26-
func testConvenienceAsyncTagInit() async throws {
27-
28-
func leaf() async throws -> Leaf {
29-
Leaf("hello")
30-
}
31-
32-
let root = try await Root {
33-
try await leaf()
34-
}
35-
let doc = Document {
36-
root
37-
}
38-
39-
XCTAssertEqual(DocumentRenderer().render(doc), """
40-
<root>
41-
<leaf>hello</leaf>
42-
</root>
43-
""")
44-
}
26+
// func testConvenienceAsyncTagInit() async throws {
27+
//
28+
// func leaf() async throws -> Leaf {
29+
// Leaf("hello")
30+
// }
31+
//
32+
// let root = try await Root {
33+
// try await leaf()
34+
// }
35+
// let doc = Document {
36+
// root
37+
// }
38+
//
39+
// XCTAssertEqual(DocumentRenderer().render(doc), """
40+
// <root>
41+
// <leaf>hello</leaf>
42+
// </root>
43+
// """)
44+
// }
4545

4646
}

0 commit comments

Comments
 (0)