Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Commit 98327f9

Browse files
committed
optimized documentation
1 parent bd6f13f commit 98327f9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Sources/UnitTests/POSIXTimeTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class POSIXTimeTests: XCTestCase {
3939

4040
XCTAssert(Int(time.timeIntervalValue) == Int(date.timeIntervalSince1970), "TimeVal derived interval: \(time.timeIntervalValue) must equal Date's timeIntervalSince1970 \(date.timeIntervalSince1970)")
4141
}
42-
42+
4343
func testTimeSpec() {
4444

4545
let date = Date()

Sources/UnitTests/RegularExpressionTests.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ extension String {
138138

139139
public func toFoundation() -> NSString {
140140

141-
let stringData = self.toUTF8Data()
142-
143-
guard let foundationString = NSString(bytes: stringData.byteValue, length: stringData.byteValue.count, encoding: NSUTF8StringEncoding)
141+
guard let foundationString = NSString(bytes: self, length: self.utf8.count, encoding: NSUTF8StringEncoding)
144142
else { fatalError("Could not convert String to NSString") }
145143

146144
return foundationString

0 commit comments

Comments
 (0)