From ddea49a40f7c9ab30a23eb8824fa1f056fe769d7 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Mon, 6 Apr 2020 23:41:13 +0100 Subject: [PATCH] Remove unused code --- Sources/LeafErrorMiddleware/LeafErrorMiddleware.swift | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Sources/LeafErrorMiddleware/LeafErrorMiddleware.swift b/Sources/LeafErrorMiddleware/LeafErrorMiddleware.swift index d80f489..e0ab6de 100644 --- a/Sources/LeafErrorMiddleware/LeafErrorMiddleware.swift +++ b/Sources/LeafErrorMiddleware/LeafErrorMiddleware.swift @@ -74,16 +74,6 @@ public final class LeafErrorMiddleware: Middleware { } } -extension HTTPStatus { - internal init(_ error: Error) { - if let abort = error as? AbortError { - self = abort.status - } else { - self = .internalServerError - } - } -} - private extension HTTPResponseStatus { var representsError: Bool { return (HTTPResponseStatus.badRequest.code ... HTTPResponseStatus.networkAuthenticationRequired.code) ~= code