Skip to content

Commit

Permalink
Merge pull request #12 from ski-u/run-swift-format
Browse files Browse the repository at this point in the history
Run swift-format
  • Loading branch information
ski-u authored Oct 30, 2024
2 parents 9c8504a + 53f09d6 commit 9a74900
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Features/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ let package = Package(
.target(
name: "Models",
dependencies: [
.product(name: "LocalDate", package: "swift-local-date"),
.product(name: "LocalDate", package: "swift-local-date")
]
),
.testTarget(
Expand Down
4 changes: 2 additions & 2 deletions Features/Sources/Models/AstronomyPicture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public struct AstronomyPicture: Equatable, Sendable {
public var mediaType: MediaType
public var title: String
public var url: URL?

public init(
copyright: String? = nil,
date: LocalDate? = nil,
Expand All @@ -27,7 +27,7 @@ public struct AstronomyPicture: Equatable, Sendable {
self.title = title
self.url = url
}

public init(response: Response) {
self.init(
copyright: response.copyright,
Expand Down
2 changes: 1 addition & 1 deletion Features/Sources/Models/MediaType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ public enum MediaType: Sendable {
case video
case other
case unknown

init(string: String) {
switch string {
case "image":
Expand Down
4 changes: 2 additions & 2 deletions Features/Tests/ModelsTests/AstronomyPictureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct AstronomyPictureTests {
title: "title",
url: "https://example.com/url"
)

let model = AstronomyPicture(
copyright: "copyright",
date: LocalDate(year: 2024, month: 1, day: 1),
Expand All @@ -27,7 +27,7 @@ struct AstronomyPictureTests {
title: "title",
url: URL(string: "https://example.com/url")!
)

#expect(AstronomyPicture(response: response) == model)
}
}

0 comments on commit 9a74900

Please sign in to comment.