Optimize collection creation in Navigation.kt (#180)
* ⚡ Optimize collection creation in Navigation.kt Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations. * ⚡ Optimize collection creation in Navigation.kt Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations. Fixed ktlint formatting issues causing CI failure.
This commit is contained in:
6 files changed
+71
-13
No files matched your search
@@ -19,7 +19,10 @@ object CronExpressionFormatter {
|
||||
|
||||
// 1. Check for common simple shortcuts
|
||||
// Every X minutes: */X * * * *
|
||||
if (minutePart.startsWith("*/") && hourPart == "*" && domPart == "*" && monthPart == "*" &&
|
||||
if (minutePart.startsWith("*/") &&
|
||||
hourPart == "*" &&
|
||||
domPart == "*" &&
|
||||
monthPart == "*" &&
|
||||
dowPart == "*"
|
||||
) {
|
||||
val step = minutePart.substring(2).toIntOrNull()
|
||||
@@ -27,7 +30,10 @@ object CronExpressionFormatter {
|
||||
}
|
||||
|
||||
// Every X hours: 0 */X * * *
|
||||
if (minutePart == "0" && hourPart.startsWith("*/") && domPart == "*" && monthPart == "*" &&
|
||||
if (minutePart == "0" &&
|
||||
hourPart.startsWith("*/") &&
|
||||
domPart == "*" &&
|
||||
monthPart == "*" &&
|
||||
dowPart == "*"
|
||||
) {
|
||||
val step = hourPart.substring(2).toIntOrNull()
|
||||
|
||||
Reference in new issue
Block a user