vrruiz / xisfits

Convert images from XISF to FITS
MIT License
8 stars 0 forks source link

Reduce the cognitive complexity of the `main()` function #8

Closed Razican closed 4 years ago

Razican commented 4 years ago

Currently, the main() function has a cognitive complexity of 38, as per cargo clippy. This is can carry some problems with optimizations of the compiler, along with making compile times longer and making it more difficult to maintain, as per the clippy documentation.

I've already seen that the function has some comments indicating various steps of the process, so maybe those could be a great start to divide the code in functions.

Let me know if you need help with this :)

vrruiz commented 4 years ago

I have moved the XISF decoding parts to a new module. cargo clippy doesn't complain anymore.