diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2023-06-15 16:39:24 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2023-06-15 16:53:21 +0530 |
commit | e875047899af00f47eec32d5415ae5f1a607947e (patch) | |
tree | 9a44c0f44a3f4b565372f78f5d88b26ba0d91452 /passgen/random/src/main | |
parent | 5dac84c3c882ee42bc541042684de18d7166fdd3 (diff) |
feat: adopt Kotlin 1.9 Enum entries feature
Diffstat (limited to 'passgen/random/src/main')
-rw-r--r-- | passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt index 4f08904d..faf0ad4c 100644 --- a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt +++ b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt @@ -7,6 +7,7 @@ package app.passwordstore.passgen.random import app.passwordstore.passgen.random.util.clearFlag import app.passwordstore.passgen.random.util.hasFlag +@OptIn(ExperimentalStdlibApi::class) public object PasswordGenerator { public const val DEFAULT_LENGTH: Int = 16 @@ -39,7 +40,7 @@ public object PasswordGenerator { var phonemes = true var pwgenFlags = DIGITS or UPPERS or LOWERS - for (option in PasswordOption.values()) { + for (option in PasswordOption.entries) { if (option in passwordOptions) { when (option) { PasswordOption.NoDigits -> pwgenFlags = pwgenFlags.clearFlag(DIGITS) |