Skip to content

Commit 994bc80

Browse files
committed
More tweaks and tidy up, diff reduction
1 parent fdf7990 commit 994bc80

18 files changed

+22
-7
lines changed

Sources/App/Commands/TriggerBuilds.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import SQLKit
1818
import Vapor
1919
@preconcurrency import SPIManifest
2020

21+
2122
struct TriggerBuildsCommand: AsyncCommand {
2223
let defaultLimit = 1
2324

Sources/App/Controllers/API/Types+WithExample.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import VaporToOpenAPI
33
import DependencyResolution
44
import PackageCollectionsSigning
55

6+
67
// MARK: - External types
78

8-
extension Foundation.Date: VaporToOpenAPI.WithExample {
9+
extension Date: VaporToOpenAPI.WithExample {
910
public static var example: Self { .init(rfc1123: "Sat, 25 Apr 2020 10:55:00 UTC")! }
1011
}
1112

Sources/App/Controllers/SiteMapController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import Fluent
1717
import SQLKit
1818
import Plot
1919

20+
2021
enum SiteMapController {
22+
2123
static let staticRoutes: [SiteURL] = [
2224
.home,
2325
.addAPackage,

Sources/App/Core/AppEnvironment.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import Vapor
2121
import FoundationNetworking
2222
#endif
2323

24+
2425
struct AppEnvironment: Sendable {
2526
var allowBuildTriggers: @Sendable () -> Bool
2627
var allowTwitterPosts: @Sendable () -> Bool

Sources/App/Core/AppMetrics.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import Metrics
1616
import Prometheus
1717
import Vapor
1818

19+
1920
enum AppMetrics {
21+
2022
nonisolated(unsafe) static var initialized = false
2123

2224
static func bootstrap() {

Sources/App/Core/DocumentationTarget.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import Fluent
1616
@preconcurrency import SPIManifest
1717

18+
1819
enum DocumentationTarget: Equatable, Codable {
1920
case external(url: String)
2021
case `internal`(docVersion: DocVersion, archive: String)

Sources/App/Core/DocumentationVersion.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
// limitations under the License.
1414

1515
import Foundation
16+
1617
import Fluent
1718
import SemanticVersion
1819
@preconcurrency import SPIManifest
1920

21+
2022
struct DocumentationMetadata {
2123
var owner: String?
2224
var repository: String?

Sources/App/Core/Emoji.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import Foundation
1616
import Vapor
1717

18+
1819
fileprivate struct Emoji: Decodable {
1920
enum CodingKeys: String, CodingKey {
2021
case unicode = "emoji"
@@ -25,6 +26,7 @@ fileprivate struct Emoji: Decodable {
2526
let names: [String]
2627
}
2728

29+
2830
struct EmojiStorage {
2931
nonisolated(unsafe) static var current = EmojiStorage()
3032
var lookup: [String: String]
@@ -74,13 +76,11 @@ struct EmojiStorage {
7476

7577
return mutableString
7678
}
77-
7879
}
7980

80-
extension String {
8181

82+
extension String {
8283
func replaceShorthandEmojis() -> String {
8384
return EmojiStorage.current.replace(inString: self)
8485
}
85-
8686
}

Sources/App/Core/Extensions/Date+ext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extension DateFormatter {
5353

5454

5555
// LosslessStringConvertible conformance is required by @Option command line argument conversion
56-
extension Foundation.Date: Swift.LosslessStringConvertible {
56+
extension Date: Swift.LosslessStringConvertible {
5757
private static var iso8601: ISO8601DateFormatter { ISO8601DateFormatter() }
5858
private static var ymd: DateFormatter {
5959
let formatter = DateFormatter()

Sources/App/Core/Extensions/SiteMap+ResponseEncodable.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import Plot
1616
import Vapor
1717

18+
1819
extension Plot.SiteMapIndex: Vapor.AsyncResponseEncodable, Renderable {
1920
public func encodeResponse(for request: Request) async throws -> Response {
2021
try await encodeXMLResponse(for: request)

0 commit comments

Comments
 (0)