Skip to content

Commit 4c82643

Browse files
committed
Use null pattern
1 parent ea385d7 commit 4c82643

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/kotlin/com/lambda/config/AbstractSetting.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ abstract class AbstractSetting<T : Any>(
159159
}
160160

161161
fun group(path: NamedEnum?) = apply {
162-
if (path != null) {
163-
groups.add(listOf(path))
164-
}
162+
path?.let { groups.add(listOf(it)) }
165163
}
166164

167165
fun reset(silent: Boolean = false) {

0 commit comments

Comments
 (0)