fix clippy warnings and clean some code
Hello! I started fixing the numerous clippy warnings inside jpeg-decoder. They improve the source readability, and sometimes performance. The work is not done, but if you want to help, you have push access to this branch :)
@kaksmet : I think this is ready for merging. Can you have a look at the changes ?
Most are trivial, mainly using as for lossless type conversions.
The only semi-significant changes are to Decoder::decode_scan: this is a 160 line long function that I tried to break down in the process of fixing a too many arguments clippy warning.
I am ready to make changes if needed.
@kaksmet : do you think you will have the time to review that? Do you need help maintaining this library?
@kaj: Thank you for the review. However, since @kaksmet does not seem to be answering to issues and PR anymore, I'm not going to invest time into splitting this into several PRs.
If anyone is still interested in this PR, I can give you access to my fork. I checked Allow edits from maintainers, so all maintainers should already have commit rights.
Is this PR still valid? Otherwise, I might create new one with Clippy/fmt fixes.
This PR has accumulated years of merge conflicts, so you're probably much better off starting a new PR.
(Please do heed the advice above about making small PRs: it is way easier to merge something if you can just eyeball and see it won't break anything!)