Skip to content

Commit 98239cf

Browse files
authored
Merge pull request #28 from JanNash/remove-deprecated-call-to-String.characters
Remove calls to deprecated String.characters property
2 parents c16f5c8 + e7ea158 commit 98239cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Ambassador/Router.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ open class Router: WebApp {
6262
let matches = regex.matches(
6363
in: searchPath,
6464
options: [],
65-
range: NSRange(location: 0, length: searchPath.characters.count)
65+
range: NSRange(location: 0, length: searchPath.count)
6666
)
6767
if !matches.isEmpty {
6868
let searchPath = searchPath as NSString

AmbassadorTests/DataResponseTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class DataResponseTests: XCTestCase {
5454
items: receivedHeaders ?? []
5555
)
5656
XCTAssertEqual(headersDict["Content-Type"], "application/my-format")
57-
XCTAssertEqual(Int(headersDict["Content-Length"] ?? "0"), "hello".characters.count)
57+
XCTAssertEqual(Int(headersDict["Content-Length"] ?? "0"), "hello".count)
5858
XCTAssertEqual(headersDict["X-Foo-Bar"], "header")
5959

6060
XCTAssertEqual(receivedData.count, 2)

0 commit comments

Comments
 (0)