From 82d8d63bdb76b6dd8febe916c639ab8608dbbaed Mon Sep 17 00:00:00 2001 From: Tanner Nelson Date: Tue, 26 Mar 2019 16:51:31 -0400 Subject: [PATCH] swift 5 warning fix --- Package.swift | 2 +- Sources/URLEncodedForm/Data/URLEncodedFormParser.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index bec8c39..1c14b1d 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:4.0 +// swift-tools-version:4.1 import PackageDescription let package = Package( diff --git a/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift b/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift index b4e4634..358c864 100644 --- a/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift +++ b/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift @@ -209,7 +209,7 @@ private extension Data { fileprivate extension Array { /// Accesses an array index or returns `nil` if the array isn't long enough. - fileprivate subscript(safe index: Int) -> Element? { + subscript(safe index: Int) -> Element? { guard index < count else { return nil }