Re-enable unit tests and fix a few lint warnings

This commit is contained in:
aringenbach
2023-04-20 16:01:17 +02:00
parent 616238f13b
commit a3f7d0433a
6 changed files with 23 additions and 24 deletions
@@ -200,14 +200,14 @@ private struct TextTrigger: Equatable {
let text: String
func asString() -> String {
return String(key.rawValue) + text
String(key.rawValue) + text
}
}
private extension String {
// Returns current completion suggestion for a text message, if any.
var currentTextTrigger: TextTrigger? {
let components = self.components(separatedBy: .whitespaces)
let components = components(separatedBy: .whitespaces)
guard var lastComponent = components.last,
lastComponent.count > 0,
let suggestionKey = SuggestionKey(rawValue: lastComponent.removeFirst()),