Skip to content

Commit

Permalink
Fix the minimum length assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
woxtu committed Dec 12, 2023
1 parent 37d593a commit 3fe9a42
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 3fe9a42

Please sign in to comment.