From 6ca02eb371a18fd39ccd856d9c88f1728fb4ec90 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 29 Jul 2020 17:10:46 +0530 Subject: Upgrade to Kotlin 1.4 (#978) * build: uprev to Kotlin 1.4 Signed-off-by: Harsh Shandilya * Remove explicit type argument Not required anymore with Kotlin 1.4 Signed-off-by: Harsh Shandilya * build: enable Kotlin 1.4 language features Signed-off-by: Harsh Shandilya * all: add trailing commas where reasonable Signed-off-by: Harsh Shandilya Co-authored-by: Fabian Henneke --- app/src/main/java/com/zeapo/pwdstore/pwgen/RandomPasswordGenerator.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/pwgen') diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgen/RandomPasswordGenerator.kt b/app/src/main/java/com/zeapo/pwdstore/pwgen/RandomPasswordGenerator.kt index e841ed76..67d8fc40 100644 --- a/app/src/main/java/com/zeapo/pwdstore/pwgen/RandomPasswordGenerator.kt +++ b/app/src/main/java/com/zeapo/pwdstore/pwgen/RandomPasswordGenerator.kt @@ -22,14 +22,13 @@ object RandomPasswordGenerator { * set, the password will not contain any symbols. * - [PasswordGenerator.NO_AMBIGUOUS]: If set, the password will not contain any ambiguous * characters. - * - [PasswordGenerator.NO_VOWELS]: If set, the password will not contain any vowels. */ fun generate(targetLength: Int, pwFlags: Int): String? { val bank = listOfNotNull( PasswordGenerator.DIGITS_STR.takeIf { pwFlags hasFlag PasswordGenerator.DIGITS }, PasswordGenerator.UPPERS_STR.takeIf { pwFlags hasFlag PasswordGenerator.UPPERS }, PasswordGenerator.LOWERS_STR.takeIf { pwFlags hasFlag PasswordGenerator.LOWERS }, - PasswordGenerator.SYMBOLS_STR.takeIf { pwFlags hasFlag PasswordGenerator.SYMBOLS } + PasswordGenerator.SYMBOLS_STR.takeIf { pwFlags hasFlag PasswordGenerator.SYMBOLS }, ).joinToString("") var password = "" -- cgit v1.2.3