Skip to content

Commit

Permalink
Remove AnyText and AnyFile
Browse files Browse the repository at this point in the history
Resolves #1
  • Loading branch information
danielctull committed Jun 26, 2024
1 parent f850095 commit c4e6d2a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 46 deletions.
13 changes: 0 additions & 13 deletions Sources/FileBuilder/File/Content/AnyFile.swift

This file was deleted.

4 changes: 2 additions & 2 deletions Sources/FileBuilder/File/FileBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public enum FileBuilder {

public static func buildLimitedAvailability<Content: File>(
_ content: Content
) -> AnyFile {
AnyFile(content)
) -> Content {
content
}

public static func buildOptional<Content: File>(
Expand Down
13 changes: 0 additions & 13 deletions Sources/FileBuilder/Text/Content/AnyText.swift

This file was deleted.

4 changes: 2 additions & 2 deletions Sources/FileBuilder/Text/TextBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public enum TextBuilder {

public static func buildLimitedAvailability<Content: Text>(
_ content: Content
) -> AnyText {
AnyText(content)
) -> Content {
content
}

public static func buildOptional<Content: Text>(
Expand Down
8 changes: 0 additions & 8 deletions Tests/FileBuilderTests/FileTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
[
Expand Down
8 changes: 0 additions & 8 deletions Tests/FileBuilderTests/TextTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ final class TextTests: XCTestCase {
}
}

func testAnyContent() throws {
try AssertText {
AnyText("Anything!")
} is: {
"Anything!"
}
}

func testArray() throws {
try AssertText {
["Hello", "World"]
Expand Down

0 comments on commit c4e6d2a

Please sign in to comment.