Skip to content

Commit

Permalink
Improvements to AI comments :)
Browse files Browse the repository at this point in the history
  • Loading branch information
lciolecki committed Nov 16, 2024
1 parent 38c21aa commit 0d4a6af
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ object RandomImplicits {
def nextString(): String =
randomString(MinStringLength + rand.nextInt(MaxStringLength - MinStringLength))

def randomString(length: Int): String =
(0 until length).map(_ => AllowedStringLetters(rand.nextInt(AllowedStringLetters.length))).mkString
def randomString(length: Int): String = {
require(length >= 0, "Length must be non-negative") ∑
(0 until length).map(_ => AllowedStringLetters(rand.nextInt(AllowedStringLetters.length))).mkString
}

}

Expand Down

0 comments on commit 0d4a6af

Please sign in to comment.