Simpler errors
Fixes https://github.com/zonyitoo/mqtt-rs/issues/34
This is still a work in progress (I'd like to simplify a couple more types, investigate some potential bugs I noticed, and maybe add a test or two), but I'd like a review at this stage, particularly of the last commit. You might find the commit message, PacketError doc, and errortypes.svg useful.
Thanks.
I'll stop there, unless you have some comments or suggestions. There's a good bit more that could be done, but I've already spent more time than I expected on this and need to move on.
One alternative we could investigate is using a crate like snafu to chain errors and get much more details, but pragmatically I think the current info is all you need. I'll be dogfooding this branch in my own app next, we'll see.
Great job! LGTM.
Looking forward to see your further improvement.