Closed gahag closed 2 years ago
@GrayJack can you add the hacktoberfest-accepted
label to this please? Salve :)
@gahag Sorry for the late reply, I had to check a few things. I have a question before I go forward to review the code.
Did you look or used GNU seq code as reference to implement this rewrite?
For the rewrite, absolutely not. I only took a brief look at GNU seq prior to asking to work on the issue, for I wondered how it circumvented the issue, which is inherent to floating point arithmetic.
@gahag I ended my review, I have nothing to point out code related. But I noticed that you didn't put yourself as author. It's more as a recognition of work than anything, so we don't mind if you use real names or nicknames, you can use whatever you feel comfortable. It's also ok you don't want to add at all
Also, if you don't mind, can you rebase so the CI runs correctly? It was a crate that changed the required rust version on patch release
@GrayJack thanks! I have added myself as co-author and rebased into origin/dev
.
bors r+
The issue #133 was quite hard to fix on the code as is, so I kind of made a major rewrite. The main strategy to prevent the precision issue, which is used in GNU Seq, is to compare the displayed numbers in order to identify if the last one should be printed. The code now adopts the same strategy, by leveraging the Display trait and keeping track of the last displayed number. The separator/terminator is output separately.
Please let me know if you have any suggestions or concerns.