vrruiz / xisfits

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

Remove the use of a HashMap for type formats #7

Closed Razican closed 4 years ago

Razican commented 4 years ago

There is no need for a HashMap to only store something known on compile-time. It's possible to use a Perfech Hash Function, but there is no need for that either, since strings are pretty small and easy to compare. I used a small function, that should probably be migrated to an enumeration as per #6.

Also, note that my editor runs cargo fmt by default, so it formats the whole code. Let me know if this is not OK, and I can edit it without running it.