Description
The implementation of argString uses the following pattern for sets:
case set: Set[_] => // Sort elements for deterministic behaviours val sortedSeq = set.toSeq.map(formatArg(_, maxFields).sorted) truncatedString(sortedSeq, "{", ", ", "}", maxFields) :: Nil
Instead of sorting the elements of the set, the implementation sorts the characters of the strings that formatArg returns.
The fix is simply to move the closing parenthesis to the correct location:
val sortedSeq = set.toSeq.map(formatArg(_, maxFields)).sorted