Skip to content

Commit

Permalink
remove unnecessary non-null coercions (due to k2 improvements)
Browse files Browse the repository at this point in the history
  • Loading branch information
sproctor committed Dec 20, 2024
1 parent 996cf66 commit 81736c6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package warlockfe.warlock3.scripting.wsl

import warlockfe.warlock3.core.text.WarlockColor
import kotlinx.coroutines.delay
import warlockfe.warlock3.core.text.StyleDefinition
import warlockfe.warlock3.core.text.WarlockColor
import warlockfe.warlock3.core.util.CaseInsensitiveMap
import warlockfe.warlock3.core.util.findArgumentBreak
import warlockfe.warlock3.core.util.parseArguments
import warlockfe.warlock3.core.util.toWarlockColor
import kotlinx.coroutines.delay
import warlockfe.warlock3.scripting.util.ScriptLoggingLevel
import java.math.BigDecimal
import kotlin.random.Random
Expand Down Expand Up @@ -67,7 +67,7 @@ val wslCommands = CaseInsensitiveMap<suspend (WslContext, String) -> Unit>(
throw WslRuntimeException("\"string\" must be specified for AddToHighlightStrings")
}
context.addHighlight(
pattern = pattern!!,
pattern = pattern,
style = StyleDefinition(
textColor = textColor ?: WarlockColor.Unspecified,
backgroundColor = backgroundColor ?: WarlockColor.Unspecified,
Expand Down Expand Up @@ -134,7 +134,7 @@ val wslCommands = CaseInsensitiveMap<suspend (WslContext, String) -> Unit>(
if (pattern == null) {
throw WslRuntimeException("\"string\" must be specified for DeleteFromHighlightStrings")
}
context.deleteHighlight(pattern = pattern!!)
context.deleteHighlight(pattern = pattern)
},
"deletevariable" to { context, args ->
val (name, _) = args.splitFirstWord()
Expand Down

0 comments on commit 81736c6

Please sign in to comment.