diff --git a/Sources/FileBuilder/File/Content/AnyFile.swift b/Sources/FileBuilder/File/Content/AnyFile.swift deleted file mode 100644 index 7060637..0000000 --- a/Sources/FileBuilder/File/Content/AnyFile.swift +++ /dev/null @@ -1,13 +0,0 @@ - -public struct AnyFile: File { - - private let content: any File - - public init(_ content: some File) { - self.content = content - } - - public var file: some File { - BuiltinFile(write: content.write) - } -} diff --git a/Sources/FileBuilder/File/FileBuilder.swift b/Sources/FileBuilder/File/FileBuilder.swift index 442677e..2edeb48 100644 --- a/Sources/FileBuilder/File/FileBuilder.swift +++ b/Sources/FileBuilder/File/FileBuilder.swift @@ -35,8 +35,8 @@ public enum FileBuilder { public static func buildLimitedAvailability( _ content: Content - ) -> AnyFile { - AnyFile(content) + ) -> Content { + content } public static func buildOptional( diff --git a/Sources/FileBuilder/Text/Content/AnyText.swift b/Sources/FileBuilder/Text/Content/AnyText.swift deleted file mode 100644 index 8ed0497..0000000 --- a/Sources/FileBuilder/Text/Content/AnyText.swift +++ /dev/null @@ -1,13 +0,0 @@ - -public struct AnyText: Text { - - private let content: any Text - - public init(_ content: some Text) { - self.content = content - } - - public var text: some Text { - BuiltinText(lines: content.lines) - } -} diff --git a/Sources/FileBuilder/Text/TextBuilder.swift b/Sources/FileBuilder/Text/TextBuilder.swift index d4fb0c8..b4420ce 100644 --- a/Sources/FileBuilder/Text/TextBuilder.swift +++ b/Sources/FileBuilder/Text/TextBuilder.swift @@ -35,8 +35,8 @@ public enum TextBuilder { public static func buildLimitedAvailability( _ content: Content - ) -> AnyText { - AnyText(content) + ) -> Content { + content } public static func buildOptional( diff --git a/Tests/FileBuilderTests/FileTests.swift b/Tests/FileBuilderTests/FileTests.swift index 15077a1..12d16fa 100644 --- a/Tests/FileBuilderTests/FileTests.swift +++ b/Tests/FileBuilderTests/FileTests.swift @@ -5,14 +5,6 @@ import XCTest final class FileTests: XCTestCase { - func testAnyFile() throws { - try AssertFile { - AnyFile(TextFile("File 1") { "One" }) - } outputs: { - .file(name: "File 1", text: "One") - } - } - func testArray() throws { try AssertFile { [ diff --git a/Tests/FileBuilderTests/TextTests.swift b/Tests/FileBuilderTests/TextTests.swift index 92807bf..2cb9987 100644 --- a/Tests/FileBuilderTests/TextTests.swift +++ b/Tests/FileBuilderTests/TextTests.swift @@ -32,14 +32,6 @@ final class TextTests: XCTestCase { } } - func testAnyContent() throws { - try AssertText { - AnyText("Anything!") - } is: { - "Anything!" - } - } - func testArray() throws { try AssertText { ["Hello", "World"]