panicbit/twinstar

Make `gemini_mime()` more convenient

Closed this issue · 0 comments

gemini_mime() is a bit inconvenient as it returns a Result. Considering that the function doesn't take parameter's and is side-effect free, it should either always succeed or always fail, depending on the correctness of the impl. The correctness of the impl can however be asserted using tests. Furthermore, there is no need to parse the mime over and over, so a lazy_static can be used.