diff --git a/Examples/SwiftSerialExample/Sources/main.swift b/Examples/SwiftSerialExample/Sources/main.swift index 402d77c..4ef4103 100644 --- a/Examples/SwiftSerialExample/Sources/main.swift +++ b/Examples/SwiftSerialExample/Sources/main.swift @@ -32,9 +32,9 @@ do { transmitRate: .baud9600, minimumBytesToRead: 1) - print("Writing test string <\(testString)> of \(testString.characters.count) characters to serial port") + print("Writing test string <\(testString)> of \(testString.count) characters to serial port") - var bytesWritten = try serialPort.writeString(testString) + let bytesWritten = try serialPort.writeString(testString) print("Successfully wrote \(bytesWritten) bytes") print("Waiting to receive what was written...") @@ -54,7 +54,7 @@ do { var multiLineString: String = "" - for i in 1...numberOfMultiNewLineTest { + for _ in 1...numberOfMultiNewLineTest { multiLineString += testString + "\n" } diff --git a/Examples/SwiftSerialIM/Sources/main.swift b/Examples/SwiftSerialIM/Sources/main.swift index 4f51cb8..33754f1 100644 --- a/Examples/SwiftSerialIM/Sources/main.swift +++ b/Examples/SwiftSerialIM/Sources/main.swift @@ -113,7 +113,7 @@ do { while true { - var enteredKey = getKeyPress() + let enteredKey = getKeyPress() printToScreenFrom(myself: true, characterToPrint: enteredKey) var _ = try serialPort.writeChar(enteredKey) }