Skip to content

Commit

Permalink
Merge pull request #3 from woxtu/patch
Browse files Browse the repository at this point in the history
Fix the minimum length assertion
  • Loading branch information
macmoonshine authored Dec 13, 2023
2 parents 37d593a + 3fe9a42 commit 5cb0439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/sqids/Sqids.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public struct Sqids {
"Alphabet length must be at least \(Self.minAlphabetLength)"
)
assert(
minLength >= 0 && minLength < Self.minLengthLimit,
"Alphabet length must be at least \(Self.minAlphabetLength)"
minLength >= 0 && minLength <= Self.minLengthLimit,
"Minimum length has to be between 0 and \(Self.minLengthLimit)"
)
assert(
alphabet.reduce(true, { $0 && $1.isASCII }),
Expand Down

0 comments on commit 5cb0439

Please sign in to comment.