Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #131 from nodes-vapor/feature/fix-swift-5-warnings
Browse files Browse the repository at this point in the history
Feature/fix swift 5 warnings
  • Loading branch information
cweinberger authored May 7, 2019
2 parents 06a7d11 + d99def1 commit a7a7d11
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:4.1
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
2 changes: 1 addition & 1 deletion Sources/AdminPanel/Controllers/LoginController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fileprivate extension LoginController {
private let password: String
}

fileprivate struct RenderLogin: Encodable {
struct RenderLogin: Encodable {
fileprivate let queryString: String?
}
}
2 changes: 1 addition & 1 deletion Sources/AdminPanel/Helpers/SidebarMenuPathGenerator.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
public typealias SidebarMenuPathGenerator<U: AdminPanelUserRoleType> = ((U?) -> String)

public extension AdminPanelUserRoleType {
public static var sidebarMenuPathGenerator: SidebarMenuPathGenerator<Self> {
static var sidebarMenuPathGenerator: SidebarMenuPathGenerator<Self> {
return { role in
role?.menuPath ?? ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extension AdminPanelUserType {
}

public extension AdminPanelUserType {
public func requireRole(_ role: Self.Role?) throws {
func requireRole(_ role: Self.Role?) throws {
guard
let myRole = self.role,
let requiredRole = role,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Fluent
import Reset
import Submissions
import Sugar
import Validation
Expand Down
4 changes: 2 additions & 2 deletions Sources/AdminPanel/Providers/AdminPanelProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Vapor

// MARK: - Commands
public extension AdminPanelProvider where U: Seedable {
public static func commands(
static func commands(
databaseIdentifier: DatabaseIdentifier<U.Database>
) -> [String: Command] {
return ["adminpanel:user-seeder": SeederCommand<U>(databaseIdentifier: databaseIdentifier)]
Expand Down Expand Up @@ -126,7 +126,7 @@ extension ResetResponses {
}

public extension LeafTagConfig {
public mutating func useAdminPanelLeafTags<U: AdminPanelUserType>(
mutating func useAdminPanelLeafTags<U: AdminPanelUserType>(
_ type: U.Type,
paths: TagTemplatePaths = .init()
) {
Expand Down
3 changes: 1 addition & 2 deletions Sources/AdminPanel/routes.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Authentication
import Flash
import Reset
import Routing
import Sugar
import Vapor
Expand Down Expand Up @@ -49,7 +48,7 @@ public struct AdminPanelMiddlewares: Service {
}

public extension Router {
public func useAdminPanelRoutes<U: AdminPanelUserType>(
func useAdminPanelRoutes<U: AdminPanelUserType>(
_ type: U.Type,
on container: Container
) throws {
Expand Down

0 comments on commit a7a7d11

Please sign in to comment.