KodrAus / decstr

IEEE 754 decimal floating point bitstrings
Apache License 2.0
6 stars 1 forks source link

Fix up a panic if a fmt::Display itself failed during parsing #8

Closed KodrAus closed 1 year ago

KodrAus commented 1 year ago

If an implementation of fmt::Display itself fails then we'll panic attempting to unwrap our error context. It might be time to look at some better basis for parsing than std::fmt, which makes tracking errors difficult.

KodrAus commented 1 year ago

I've also removed the few unsafe blocks too. They don't seem to make much of a difference, and since there's also generics involved if we ever decide to expose things like the text module they'll need to be rethought anyways.